TL;DR: The oldest deprecated JavaScript functions ("wikibits") are being removed. Most gadgets and site scripts on Wikimedia wikis don't use these anymore, but you may need to adjust user scripts.
This change will be part of MediaWiki 1.29.0-wmf.21, which goes to Wikimedia wikis from 25 April. The removal covers almost all wikibits functions that were deprecated in MediaWiki 1.17 and 1.18 (in 2010 and 2011). They have had console warnings since MediaWiki 1.22 (April 2013). [1] Only a few functions are being kept (importScript, importStylesheet, and addOnloadHook - those may be removed later.
We considered removal in MediaWiki 1.22 but, to avoid disruption, we instead replaced most variables with dummy placeholders. This meant that calling code was silently disabled, instead of causing cascading failures into other code. Anything still using these variables today has been broken since at least April 2013.
This removal includes:
* User-Agent variables: is_gecko, is_chrome_mac, is_chrome, webkit_version, is_safari_win, is_safari, webkit_match, is_ff2, ff2_bugs, is_ff2_win, is_ff2_x11, opera95_bugs, opera7_bugs, opera6_bugs, is_opera_95, is_opera_preseven, is_opera, ie6_bugs. (deprecated since 1.17; warnings and hardcoded to false since 1.22)
* User-Agent string: clientPC (deprecated since 1.17; warnings added in 1.22)
* DOM manipulation: changeText, killEvt, addHandler, hookEvent, addClickHandler, removeHandler, getElementsByClassName, getInnerText. (deprecated since 1.17; replaced with no-op warning dummies in 1.22)
* Checkbox utilities: setupCheckboxShiftClick, addCheckboxClickHandlers. (deprecated since 1.17; replaced with no-op warning dummies in 1.22)
* Classic toolbar utilities: mwEditButtons, mwCustomEditButtons (deprecated since 1.17; replaced with no-op warning dummies in 1.22)
* Misc utilities: - injectSpinner, removeSpinner, escapeQuotes, escapeQuotesHTML, jsMsg (deprecated since 1.17; replaced with no-op warning dummies in 1.22) - addPortletLink, appendCSS, tooltipAccessKeyPrefix, tooltipAccessKeyRegexp, updateTooltipAccessKeys (deprecated since 1.17; warnings added in 1.22)
Examples of how to upgrade existing scripts using these, see:
https://www.mediawiki.org/wiki/ResourceLoader/Legacy_JavaScript#wikibits.js
For an introduction to mediawiki.js, jQuery, and other modern libraries, see: https://www.mediawiki.org/wiki/ResourceLoader/Core_modules
Yours, -- Krinkle
Phabricator Task: https://phabricator.wikimedia.org/T122755
[1] wikitech-l: First round of JavaScript deprecations (introducing mw.log.deprecate for wikibits) - MediaWiki 1.23 (2013) https://www.mail-archive.com/[email protected]/msg72198.html