aboutsummaryrefslogtreecommitdiffstats
path: root/packages/notificationbox/lib/main.js
diff options
context:
space:
mode:
authorNik Nyby <nikolas@gnu.org>2015-01-17 17:12:36 -0500
committerNik Nyby <nikolas@gnu.org>2015-01-17 17:12:36 -0500
commitada88090ead2c3b9d0804794c5f20f9b24d1c2b1 (patch)
tree2838a7eee6c5d74094216acebd86915e0ea1de42 /packages/notificationbox/lib/main.js
downloadlibrejsxul-ada88090ead2c3b9d0804794c5f20f9b24d1c2b1.tar.lz
librejsxul-ada88090ead2c3b9d0804794c5f20f9b24d1c2b1.tar.xz
librejsxul-ada88090ead2c3b9d0804794c5f20f9b24d1c2b1.zip
Import to new git repository
The old repository was using almost 100mb of space because of all the unnecessary files in the history. So I've imported the code to a new git repository. Unfortunately the history isn't viewable from this repository anymore. To see what happened with LibreJS before 2015, see the old Bazaar repo here: http://bzr.savannah.gnu.org/lh/librejs/
Diffstat (limited to 'packages/notificationbox/lib/main.js')
-rw-r--r--packages/notificationbox/lib/main.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/notificationbox/lib/main.js b/packages/notificationbox/lib/main.js
new file mode 100644
index 0000000..0d17404
--- /dev/null
+++ b/packages/notificationbox/lib/main.js
@@ -0,0 +1,16 @@
+/*
+ * Copyrights Loic J. Duros 2012
+ * lduros@member.fsf.org
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+var self = require("sdk/self");
+var notification = require("notification-box").NotificationBox({
+ 'value': 'important-message',
+ 'label': 'You have been warned...',
+ 'priority': 'WARNING_HIGH',
+ 'image': self.data.url("gnu-icon.png"),
+ 'buttons': [{'label': "Gotcha",
+ 'onClick': function () { console.log("You clicked the important button!"); }}]
+});