Skip to content

Commit

Permalink
Fixed issue with displaying notification in firefox.
Browse files Browse the repository at this point in the history
  • Loading branch information
pilar6195 committed Oct 24, 2019
1 parent 52b6d04 commit 9680e05
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ function createNotification(title, message = '', sticky = false, timeout) {
const notificationContent = {
type: 'basic',
iconUrl: 'logo.png',
title, message,
requireInteraction: typeof InstallTrigger === 'undefined'
? sticky
: false
title, message
};

if (typeof InstallTrigger === 'undefined') {
notificationContent.requireInteraction = sticky;
}

const id = `notification_${Date.now()}`;
browser.notifications.create(id, notificationContent);

Expand Down

0 comments on commit 9680e05

Please sign in to comment.