Skip to content

Instantly share code, notes, and snippets.

@balajek
Created April 5, 2018 11:30
Show Gist options
  • Save balajek/4bc4f7750ed34811acd6a14e33fa035c to your computer and use it in GitHub Desktop.
Save balajek/4bc4f7750ed34811acd6a14e33fa035c to your computer and use it in GitHub Desktop.
Determine if notifications are permitted by user
browser.notifications.getPermissionLevel(function (level) {
window.alert("Notification permission: " + level);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment