Fomafix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/330898 )
Change subject: Replace $( document ).ready(...) by $(...) ...................................................................... Replace $( document ).ready(...) by $(...) In jQuery 3 $(document).ready(...) is deprecated. https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function Change-Id: I84a328eb37e0de825bcc07ae2c697c11722bc533 --- M resources/js/ext.translate.base.js M resources/js/ext.translate.dropdownmenu.js M resources/js/ext.translate.navitoggle.js M resources/js/ext.translate.quickedit.js M resources/js/ext.translate.special.aggregategroups.js M resources/js/ext.translate.special.importtranslations.js M resources/js/ext.translate.special.languagestats.js M resources/js/ext.translate.special.managetranslatorsandbox.js M resources/js/ext.translate.special.pagemigration.js M resources/js/ext.translate.special.pagepreparation.js M resources/js/ext.translate.special.pagetranslation.js M resources/js/ext.translate.special.searchtranslations.js M resources/js/ext.translate.special.translate.js M resources/js/ext.translate.special.translate.legacy.js M resources/js/ext.translate.special.translationstash.js 15 files changed, 17 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/98/330898/1 diff --git a/resources/js/ext.translate.base.js b/resources/js/ext.translate.base.js index d3facd5..1262257 100644 --- a/resources/js/ext.translate.base.js +++ b/resources/js/ext.translate.base.js @@ -176,7 +176,7 @@ $( window ).on( 'pageshow.translate', pageShowHandler ); } - $( document ).ready( function () { + $( function () { translateOnBeforeUnloadRegister(); } ); }( jQuery, mediaWiki ) ); diff --git a/resources/js/ext.translate.dropdownmenu.js b/resources/js/ext.translate.dropdownmenu.js index 7e4859c..34db251 100644 --- a/resources/js/ext.translate.dropdownmenu.js +++ b/resources/js/ext.translate.dropdownmenu.js @@ -1,7 +1,7 @@ ( function ( $ ) { 'use strict'; - $( document ).ready( function () { + $( function () { // Hide the dropdown menu when clicking outside of it $( 'html' ).on( 'click', function ( e ) { if ( !e.isDefaultPrevented() ) { diff --git a/resources/js/ext.translate.navitoggle.js b/resources/js/ext.translate.navitoggle.js index f3bed05..a712b60 100644 --- a/resources/js/ext.translate.navitoggle.js +++ b/resources/js/ext.translate.navitoggle.js @@ -15,7 +15,7 @@ }; }() ); - $( document ).ready( function () { + $( function () { var $miniLogo, $toggle, rtl, delim, $body = $( 'body' ); diff --git a/resources/js/ext.translate.quickedit.js b/resources/js/ext.translate.quickedit.js index 1be5f2f..c19a0cf 100644 --- a/resources/js/ext.translate.quickedit.js +++ b/resources/js/ext.translate.quickedit.js @@ -409,5 +409,5 @@ } } ); - $( document ).ready( mw.translate.init ); + $( mw.translate.init ); }( jQuery, mediaWiki, autosize ) ); diff --git a/resources/js/ext.translate.special.aggregategroups.js b/resources/js/ext.translate.special.aggregategroups.js index f2e54fe..9f5246e 100644 --- a/resources/js/ext.translate.special.aggregategroups.js +++ b/resources/js/ext.translate.special.aggregategroups.js @@ -160,7 +160,7 @@ $parent.children( '.tp-edit-group' ).addClass( 'hidden' ); } - $( document ).ready( function () { + $( function () { var excludeFunction, autocompleteFunction, resp, api = new mw.Api(), exclude = [], diff --git a/resources/js/ext.translate.special.importtranslations.js b/resources/js/ext.translate.special.importtranslations.js index 519c448..2dc070f 100644 --- a/resources/js/ext.translate.special.importtranslations.js +++ b/resources/js/ext.translate.special.importtranslations.js @@ -9,7 +9,7 @@ } } - $( document ).ready( function () { + $( function () { var $input = $( '#mw-translate-up-local-input' ); $input.on( 'change', function () { buttoner( $input ); diff --git a/resources/js/ext.translate.special.languagestats.js b/resources/js/ext.translate.special.languagestats.js index 5ac5bf6..c01920e 100644 --- a/resources/js/ext.translate.special.languagestats.js +++ b/resources/js/ext.translate.special.languagestats.js @@ -8,7 +8,7 @@ ( function ( mw, $ ) { 'use strict'; - $( document ).ready( function () { + $( function () { var $allChildRows, $allTogglesCache, $toggleAllButton, $translateTable = $( '.mw-sp-translate-table' ), $metaRows = $( 'tr.AggregateMessageGroup', $translateTable ); @@ -101,7 +101,7 @@ // When hovering a row, adjust brightness of the last two custom-colored cells as well // See also translate.langstats.css for the highlighting for the other normal rows mw.loader.using( 'jquery.colorUtil', function () { - $( document ).ready( function () { + $( function () { // It is possible that the first event we get is hover-out, in // which case the colors will get stuck wrong. Ignore it. var seenHoverIn = false; @@ -128,7 +128,7 @@ } ); } ); - $( document ).ready( function () { + $( function () { var index, sort = {}, re = /#sortable:(\d+)=(asc|desc)/, diff --git a/resources/js/ext.translate.special.managetranslatorsandbox.js b/resources/js/ext.translate.special.managetranslatorsandbox.js index 5ea2ab3..d95e962 100644 --- a/resources/js/ext.translate.special.managetranslatorsandbox.js +++ b/resources/js/ext.translate.special.managetranslatorsandbox.js @@ -716,7 +716,7 @@ }; }() ); - $( document ).ready( function () { + $( function () { var $requestCheckboxes = $( '.request-selector' ), $selectAll = $( '.request-selector-all' ), $requestRows = $( '.requests .request' ); diff --git a/resources/js/ext.translate.special.pagemigration.js b/resources/js/ext.translate.special.pagemigration.js index fa05eff..74e1818 100644 --- a/resources/js/ext.translate.special.pagemigration.js +++ b/resources/js/ext.translate.special.pagemigration.js @@ -506,7 +506,7 @@ $listing.on( 'click', '.mw-tpm-sp-action--add', addHandler ); } - $( document ).ready( listen ); + $( listen ); mw.translate = mw.translate || {}; mw.translate = $.extend( mw.translate, { diff --git a/resources/js/ext.translate.special.pagepreparation.js b/resources/js/ext.translate.special.pagepreparation.js index ce3bd83..bdbbcc4 100644 --- a/resources/js/ext.translate.special.pagepreparation.js +++ b/resources/js/ext.translate.special.pagepreparation.js @@ -360,7 +360,7 @@ return namespaces; } - $( document ).ready( function () { + $( function () { var pageContent, $input = $( '#page' ); diff --git a/resources/js/ext.translate.special.pagetranslation.js b/resources/js/ext.translate.special.pagetranslation.js index 736b722..3597ff4 100644 --- a/resources/js/ext.translate.special.pagetranslation.js +++ b/resources/js/ext.translate.special.pagetranslation.js @@ -7,7 +7,7 @@ ( function ( $, mw ) { 'use strict'; - $( document ).ready( function () { + $( function () { $( '#wpUserLanguage' ).multiselectautocomplete( { inputbox: '#tpt-prioritylangs' } ); $( '#mw-content-text' ).on( 'click', '.mw-translate-jspost', function ( e ) { diff --git a/resources/js/ext.translate.special.searchtranslations.js b/resources/js/ext.translate.special.searchtranslations.js index 848697f..259641a 100644 --- a/resources/js/ext.translate.special.searchtranslations.js +++ b/resources/js/ext.translate.special.searchtranslations.js @@ -3,7 +3,7 @@ var resultGroups; - $( document ).ready( function () { + $( function () { var $messages = $( '.tux-message' ); resultGroups = $( '.facet.groups' ).data( 'facets' ); diff --git a/resources/js/ext.translate.special.translate.js b/resources/js/ext.translate.special.translate.js index 22be123..b91edf9 100644 --- a/resources/js/ext.translate.special.translate.js +++ b/resources/js/ext.translate.special.translate.js @@ -228,7 +228,7 @@ $element.uls( ulsOptions ); } - $( document ).ready( function () { + $( function () { var $translateContainer, $hideTranslatedButton, $messageList, filter, uri, position; diff --git a/resources/js/ext.translate.special.translate.legacy.js b/resources/js/ext.translate.special.translate.legacy.js index a118d90..f527119 100644 --- a/resources/js/ext.translate.special.translate.legacy.js +++ b/resources/js/ext.translate.special.translate.legacy.js @@ -1,6 +1,6 @@ ( function ( $, mw ) { 'use strict'; - $( 'document' ).ready( function () { + $( function () { var api = new mw.Api(); $( '.mw-translate-messagereviewbutton' ).click( function () { diff --git a/resources/js/ext.translate.special.translationstash.js b/resources/js/ext.translate.special.translationstash.js index a81680c..4667415 100644 --- a/resources/js/ext.translate.special.translationstash.js +++ b/resources/js/ext.translate.special.translationstash.js @@ -200,7 +200,7 @@ } ); } - $( 'document' ).ready( function () { + $( function () { var $messageTable = $( '.tux-messagelist' ), $ulsTrigger = $( '.ext-translate-language-selector > .uls' ); -- To view, visit https://gerrit.wikimedia.org/r/330898 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84a328eb37e0de825bcc07ae2c697c11722bc533 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Fomafix <foma...@googlemail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits