Skip to content

Commit 1d95bf6

Browse files
committed
snoozz wakeup changes
1 parent e9a1f09 commit 1d95bf6

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PRs and other ideas are welcome.
1414
- Use minutes in your 'Morning' and 'Evening' times (Can set as 8:45am instead of 9:00am)
1515
- Choose 'Morning', 'Evening' or 'Now' times directly from the Snoozz popup, right click menu, and key bindings
1616
- Update Animal icons to be more consistent
17+
- Snoozz will now wait for a network connection before reopening tabs after your device wakes up
1718

1819
#### 2.4.3
1920
- Enable / Disable notifications from the settings page

html/nap-room.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ <h3>What's new?</h3>
2828
<p>More choice is always a good thing right?</p>
2929
<li>Icon Packs!</li>
3030
<p>Switch to the newly introduced <b>Animal</b> pack. Misanthropists will love this.</p>
31+
<li>Snoozz will now wait for a connection when your computer wakes up.</li>
3132
</ul>
3233
</div>
3334
</div>

scripts/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ chrome.storage.onChanged.addListener(async changes => {
2525

2626
if (chrome.notifications) chrome.notifications.onClicked.addListener(async id => {
2727
await chrome.notifications.clear(id)
28+
if (id === '_wakeUpNow') return await wakeUpTask();
2829
var t = await getSnoozedTabs(id);
2930
if (t && t.id && id && id.length) {
3031
var found = t.tabs ? await findTabAnywhere(null, t.id) : await findTabAnywhere(t.url);
@@ -210,7 +211,6 @@ chrome.alarms.onAlarm.addListener(async a => { if (a.name === 'wakeUpTabs') awai
210211
if (chrome.idle) chrome.idle.onStateChanged.addListener(async s => {
211212
if (s === 'active' || getBrowser() === 'firefox') {
212213
if (navigator && navigator.onLine === false) {
213-
console.log('waiting');
214214
window.addEventListener('online', async _ => {await wakeUpTask()}, {once: true});
215215
} else {
216216
await wakeUpTask();

0 commit comments

Comments
 (0)