Created
August 12, 2017 07:03
-
-
Save cimfalab/017279ceb15868abb1408547495a37a5 to your computer and use it in GitHub Desktop.
alert.js
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
notificationReceived: function(notification, payload, sender) { | |
if (notification === "SHOW_ALERT") { | |
if (typeof payload.type === "undefined") { payload.type = "alert"; } | |
if (payload.type == "alert") { | |
this.show_alert(payload, sender); | |
} else if (payload.type = "notification") { | |
this.show_notification(payload); | |
} | |
} else if (notification === "HIDE_ALERT") { | |
this.hide_alert(sender); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment