Created
April 1, 2015 02:37
-
-
Save nhirata/2a57e19e6a29df10db6f to your computer and use it in GitHub Desktop.
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 popup(title, text) { | |
try { | |
Components.classes['@mozilla.org/alerts-service;1'] | |
.getService(Components.interfaces.nsIAlertsService) | |
.showAlertNotification(null, title, text, false, '', null); | |
} catch(e) { | |
// prevents runtime error on platforms that don't implement nsIAlertsService | |
} | |
} | |
for (i = 0; i <= 20; i++) { | |
setTimeout(popup(i, "notification " + i, 10000)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment