Skip to content

Commit

Permalink
Fixed 1 notification on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc committed Jan 29, 2019
1 parent 461df53 commit f9bebf4
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,19 @@ chrome.runtime.onInstalled.addListener(function (details) {
})

chrome.runtime.onStartup.addListener(function () {
chrome.storage.local.get(['is_dismissed'], function (result) {
if (result && result['is_dismissed'] === 'false') {
chrome.browserAction.setBadgeText({
text: '1'
})
}
})

chrome.runtime.onConnect.addListener(function (externalPort) {
chrome.storage.local.set({
'rewards_panel_open': 'true'
})

chrome.storage.local.get(['is_dismissed'], function (result) {
if (result && result['is_dismissed'] === 'false') {
chrome.browserAction.setBadgeText({
text: '1'
})
}
})
externalPort.onDisconnect.addListener(function () {
chrome.storage.local.set({
'rewards_panel_open': 'false'
Expand Down

0 comments on commit f9bebf4

Please sign in to comment.