summaryrefslogtreecommitdiff
path: root/resources/src/mediawiki/mediawiki.notify.js
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:12:12 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:12:12 -0400
commitc9aa36da061816dee256a979c2ff8d2ee41824d9 (patch)
tree29f7002b80ee984b488bd047dbbd80b36bf892e9 /resources/src/mediawiki/mediawiki.notify.js
parentb4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff)
parentd1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff)
Merge branch 'archwiki'
# Conflicts: # skins/ArchLinux.php # skins/ArchLinux/archlogo.gif
Diffstat (limited to 'resources/src/mediawiki/mediawiki.notify.js')
-rw-r--r--resources/src/mediawiki/mediawiki.notify.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/resources/src/mediawiki/mediawiki.notify.js b/resources/src/mediawiki/mediawiki.notify.js
new file mode 100644
index 00000000..c1e1dabf
--- /dev/null
+++ b/resources/src/mediawiki/mediawiki.notify.js
@@ -0,0 +1,27 @@
+/**
+ * @class mw.plugin.notify
+ */
+( function ( mw ) {
+ 'use strict';
+
+ /**
+ * @see mw.notification#notify
+ * @param message
+ * @param options
+ * @return {jQuery.Promise}
+ */
+ mw.notify = function ( message, options ) {
+ // Don't bother loading the whole notification system if we never use it.
+ return mw.loader.using( 'mediawiki.notification' )
+ .then( function () {
+ // Call notify with the notification the user requested of us.
+ return mw.notification.notify( message, options );
+ } );
+ };
+
+ /**
+ * @class mw
+ * @mixins mw.plugin.notify
+ */
+
+}( mediaWiki ) );