X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=resources%2Fsrc%2Fmediawiki.widgets%2Fmw.widgets.TitleWidget.js;h=c256f1f8b13a1e898ca709ece2848144cb864af0;hb=2f5d88819799f077f4d3a3288dad104141692f20;hp=2340f9cfe587f614451beb4beadc66a2f11c6f26;hpb=2ff855cd494b1274ece1c316ce2d830e659ee964;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js index 2340f9cfe5..c256f1f8b1 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js @@ -4,7 +4,7 @@ * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt * @license The MIT License (MIT); see LICENSE.txt */ -( function ( $, mw ) { +( function () { var hasOwn = Object.prototype.hasOwnProperty; /** @@ -102,7 +102,7 @@ var api = this.getApi(), cache = this.constructor.static.interwikiPrefixesPromiseCache, key = api.defaults.ajax.url; - if ( !cache.hasOwnProperty( key ) ) { + if ( !Object.prototype.hasOwnProperty.call( cache, key ) ) { cache[ key ] = api.get( { action: 'query', meta: 'siteinfo', @@ -113,7 +113,7 @@ // Workaround T97096 by setting uselang=content uselang: 'content' } ).then( function ( data ) { - return $.map( data.query.interwikimap, function ( interwiki ) { + return data.query.interwikimap.map( function ( interwiki ) { return interwiki.prefix; } ); } ); @@ -378,4 +378,4 @@ return !!this.getMWTitle(); }; -}( jQuery, mediaWiki ) ); +}() );