From 391de0b4b65e41a2db9dd3b6e97ec35082e558f7 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Fri, 4 May 2018 11:39:47 -0700 Subject: [PATCH] mediawiki.util: Drop jsMessage(), deprecated since 1.20 and mostly unused This also means that mediawiki.notify is no longer loaded. Bug: T193901 Change-Id: Ifa222ca05ec913c140284ee0113c0d7827215130 --- RELEASE-NOTES-1.33 | 1 + resources/Resources.php | 1 - resources/src/mediawiki.util.js | 21 --------------------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index 677b1c1874..628227e8f3 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -152,6 +152,7 @@ because of Phabricator reports. * filterIntval() * filterTimezoneInput() * getTimeZoneList() +* mw.util.jsMessage(), deprecated in 1.20, was removed. Use mw.notify instead. === Deprecations in 1.33 === * The configuration option $wgUseESI has been deprecated, and is expected diff --git a/resources/Resources.php b/resources/Resources.php index cb1f2bde91..0385d8000b 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1372,7 +1372,6 @@ return [ 'dependencies' => [ 'jquery.accessKeyLabel', 'mediawiki.RegExp', - 'mediawiki.notify', ], 'targets' => [ 'desktop', 'mobile' ], ], diff --git a/resources/src/mediawiki.util.js b/resources/src/mediawiki.util.js index 27031f10ba..65fe3d3e8f 100644 --- a/resources/src/mediawiki.util.js +++ b/resources/src/mediawiki.util.js @@ -516,27 +516,6 @@ } }; - /** - * Add a little box at the top of the screen to inform the user of - * something, replacing any previous message. - * Calling with no arguments, with an empty string or null will hide the message - * - * @method jsMessage - * @deprecated since 1.20 Use mw#notify - * @param {Mixed} message The DOM-element, jQuery object or HTML-string to be put inside the message box. - * to allow CSS/JS to hide different boxes. null = no class used. - */ - mw.log.deprecate( util, 'jsMessage', function ( message ) { - if ( !arguments.length || message === '' || message === null ) { - return true; - } - if ( typeof message !== 'object' ) { - message = $.parseHTML( message ); - } - mw.notify( message, { autoHide: true, tag: 'legacy' } ); - return true; - }, 'Use mw.notify instead.', 'mw.util.jsMessage' ); - /** * Initialisation of mw.util.$content */ -- 2.20.1