Skip to content

Commit

Permalink
feat: Close notifications after two seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
RossWang committed Nov 18, 2017
1 parent eadf1ee commit 3acedbc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions App/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ function notify(message) {
iconUrl: '/data/icons/48.png',
title: browser.i18n.getMessage("extensionName"),
message: message.message || message
}).then((id) => {
setTimeout(() => {
browser.notifications.clear(id.toString());
}, 2000);
});
}

Expand Down

0 comments on commit 3acedbc

Please sign in to comment.