jquery.textSelection: Remove incorrect browser hack for old Opera
[lhc/web/wiklou.git] / resources / src / mediawiki / mediawiki.confirmCloseWindow.js
index 4d0c135..ee3bac2 100644 (file)
@@ -1,9 +1,5 @@
-/* jshint devel: true */
 ( function ( mw, $ ) {
        /**
-        * @method confirmCloseWindow
-        * @member mw
-        *
         * Prevent the closing of a window with a confirm message (the onbeforeunload event seems to
         * work in most browsers.)
         *
@@ -25,6 +21,8 @@
         *         // do whatever you wanted to do
         *     }
         *
+        * @method confirmCloseWindow
+        * @member mw
         * @param {Object} [options]
         * @param {string} [options.namespace] Namespace for the event registration
         * @param {string} [options.message]
                         */
                        trigger: function () {
                                // use confirm to show the message to the user (if options.text() is true)
+                               // eslint-disable-next-line no-alert
                                if ( options.test() && !confirm( message ) ) {
                                        // the user want to keep the actual page
                                        return false;
                        }
                };
        };
-} )( mediaWiki, jQuery );
+}( mediaWiki, jQuery ) );