Last active
September 19, 2018 10:53
-
-
Save JokingChicken/69ca9ba6889d9b5cee25839269a7e536 to your computer and use it in GitHub Desktop.
simple notification handling
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
/* | |
* creator: Danj (https://github.com/DanBrothers) | |
* description: custom notification, made for easy configuration (works with mobile) | |
* license: MIT, please link to this if you copy (thanks) | |
* | |
* usage: | |
var customnotes = new customnotes({ | |
enabled: true, | |
default: false | |
}); | |
customnotes.display("this is a test...", {1:"test", "test2":"test2"} , function(note, button, error) { | |
if(error) { | |
console.error(error); | |
return false; | |
} | |
if(button === 1) { | |
console.log("clicked test"); | |
note.close(); | |
} | |
if(button === "test2") { | |
console.log("clicked test2"); | |
note.close(); | |
} | |
return true; | |
}); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment