- msg = 'Use jQuery instead.';
-
- // Ignored dummy values
- mw.log.deprecate( win, 'doneOnloadHook', undefined, msg );
- mw.log.deprecate( win, 'onloadFuncts', [], msg );
- mw.log.deprecate( win, 'runOnloadHook', $.noop, msg );
- mw.log.deprecate( win, 'changeText', $.noop, msg );
- mw.log.deprecate( win, 'killEvt', $.noop, msg );
- mw.log.deprecate( win, 'addHandler', $.noop, msg );
- mw.log.deprecate( win, 'hookEvent', $.noop, msg );
- mw.log.deprecate( win, 'addClickHandler', $.noop, msg );
- mw.log.deprecate( win, 'removeHandler', $.noop, msg );
- mw.log.deprecate( win, 'getElementsByClassName', function () { return []; }, msg );
- mw.log.deprecate( win, 'getInnerText', function () { return ''; }, msg );
-
- // Run a function after the window onload event is fired
- mw.log.deprecate( win, 'addOnloadHook', function ( hookFunct ) {
- if ( onloadFuncts ) {
- onloadFuncts.push( hookFunct );
- } else {
- // If func queue is gone the event has happened already,
- // run immediately instead of queueing.
- hookFunct();
- }
- }, msg );
-
- $( win ).on( 'load', function () {
- var i, functs;
-
- // Don't run twice
- if ( !onloadFuncts ) {
- return;
- }
-
- // Deference and clear onloadFuncts before running any
- // hooks to make sure we don't miss any addOnloadHook
- // calls.
- functs = onloadFuncts.slice();
- onloadFuncts = undefined;
-
- // Execute the queued functions
- for ( i = 0; i < functs.length; i++ ) {
- functs[ i ]();
- }
- } );
-
- /**
- * Toggle checkboxes with shift selection
- *
- * @deprecated since 1.17 Use jquery.checkboxShiftClick instead
- */
- msg = 'Use jquery.checkboxShiftClick instead.';
- mw.log.deprecate( win, 'checkboxes', [], msg );
- mw.log.deprecate( win, 'lastCheckbox', null, msg );
- mw.log.deprecate( win, 'setupCheckboxShiftClick', $.noop, msg );
- mw.log.deprecate( win, 'addCheckboxClickHandlers', $.noop, msg );
- mw.log.deprecate( win, 'checkboxClickHandler', $.noop, msg );
-
- /**
- * Add a button to the default editor toolbar
- *
- * @deprecated since 1.17 Use mw.toolbar instead
- */
- mw.log.deprecate( win, 'mwEditButtons', [], 'Use mw.toolbar instead.' );
- mw.log.deprecate( win, 'mwCustomEditButtons', [], 'Use mw.toolbar instead.' );
-
- /**
- * Spinner creation, injection and removal
- *
- * @deprecated since 1.18 Use jquery.spinner instead
- */
- mw.log.deprecate( win, 'injectSpinner', $.noop, 'Use jquery.spinner instead.' );
- mw.log.deprecate( win, 'removeSpinner', $.noop, 'Use jquery.spinner instead.' );
-
- /**
- * Escape utilities
- *
- * @deprecated since 1.18 Use mw.html instead
- */
- mw.log.deprecate( win, 'escapeQuotes', $.noop, 'Use mw.html instead.' );
- mw.log.deprecate( win, 'escapeQuotesHTML', $.noop, 'Use mw.html instead.' );
-
- /**
- * Display a message to the user
- *
- * @deprecated since 1.17 Use mediawiki.notify instead
- * @param {string|HTMLElement} message To be put inside the message box
- */
- mw.log.deprecate( win, 'jsMsg', 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 mediawiki.notify instead.' );
-
- /**
- * Misc. utilities
- *
- * @deprecated since 1.17 Use mediawiki.util or jquery.accessKeyLabel instead
- */
- msg = 'Use mediawiki.util instead.';
- mw.log.deprecate( win, 'addPortletLink', mw.util.addPortletLink, msg );
- mw.log.deprecate( win, 'appendCSS', mw.util.addCSS, msg );
- msg = 'Use jquery.accessKeyLabel instead.';
- mw.log.deprecate( win, 'tooltipAccessKeyPrefix', 'alt-', msg );
- mw.log.deprecate( win, 'tooltipAccessKeyRegexp', /\[(alt-)?(.)\]$/, msg );
- // mw.util.updateTooltipAccessKeys already generates a deprecation message.
- win.updateTooltipAccessKeys = function () {
- return mw.util.updateTooltipAccessKeys.apply( null, arguments );
- };