Skip to content

Commit

Permalink
Get current options when getting notifications from api
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Jul 21, 2017
1 parent fe61c75 commit 8a6d200
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions background.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const notificationsUrl = "https://github.com/notifications";
var count = 0;

browser.storage.local
.get({
accessToken: '',
showNotifications: false
})
.then((options) => {
function update() {
function update() {
browser.storage.local
.get({
accessToken: '',
showNotifications: false
})
.then((options) => {
if (!options.accessToken) {
return;
}
Expand Down Expand Up @@ -52,10 +52,11 @@ browser.storage.local
});
});
});
}

setInterval(update, 1000 * 60);
});
});
}

setInterval(update, 1000 * 60);

browser.browserAction.onClicked.addListener((e) => {
browser.tabs.query({
Expand Down

0 comments on commit 8a6d200

Please sign in to comment.