Skip to content

Commit

Permalink
snoozz wakeup changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanb10 committed Jun 20, 2021
1 parent e9a1f09 commit 1d95bf6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PRs and other ideas are welcome.
- Use minutes in your 'Morning' and 'Evening' times (Can set as 8:45am instead of 9:00am)
- Choose 'Morning', 'Evening' or 'Now' times directly from the Snoozz popup, right click menu, and key bindings
- Update Animal icons to be more consistent
- Snoozz will now wait for a network connection before reopening tabs after your device wakes up

#### 2.4.3
- Enable / Disable notifications from the settings page
Expand Down
1 change: 1 addition & 0 deletions html/nap-room.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h3>What's new?</h3>
<p>More choice is always a good thing right?</p>
<li>Icon Packs!</li>
<p>Switch to the newly introduced <b>Animal</b> pack. Misanthropists will love this.</p>
<li>Snoozz will now wait for a connection when your computer wakes up.</li>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ chrome.storage.onChanged.addListener(async changes => {

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

0 comments on commit 1d95bf6

Please sign in to comment.