Created
January 24, 2016 20:50
-
-
Save JavaScript-Packer/4198223431c54481d792 to your computer and use it in GitHub Desktop.
Internet Browser notifications in JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function() { | |
"Notification" in window ? "granted" === Notification.permission ? new Notification("Hi there from WHAK.com!") :"denied" !== Notification.permission && Notification.requestPermission(function(permission) { | |
"granted" === permission && new Notification("Hi there from WHAK.com!"); | |
}) :alert("no"); | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment