Skip to content

Instantly share code, notes, and snippets.

@JokingChicken
Last active September 19, 2018 10:53
Show Gist options
  • Save JokingChicken/69ca9ba6889d9b5cee25839269a7e536 to your computer and use it in GitHub Desktop.
Save JokingChicken/69ca9ba6889d9b5cee25839269a7e536 to your computer and use it in GitHub Desktop.
simple notification handling
/*
* 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