dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "resourceloader: Simplify StringSet fallback"
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki.widgets
/
mw.widgets.TitleWidget.js
diff --git
a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
index
2340f9c
..
c256f1f
100644
(file)
--- 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
*/
* @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;
/**
var hasOwn = Object.prototype.hasOwnProperty;
/**
@@
-102,7
+102,7
@@
var api = this.getApi(),
cache = this.constructor.static.interwikiPrefixesPromiseCache,
key = api.defaults.ajax.url;
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',
cache[ key ] = api.get( {
action: 'query',
meta: 'siteinfo',
@@
-113,7
+113,7
@@
// Workaround T97096 by setting uselang=content
uselang: 'content'
} ).then( function ( data ) {
// 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;
} );
} );
return interwiki.prefix;
} );
} );
@@
-378,4
+378,4
@@
return !!this.getMWTitle();
};
return !!this.getMWTitle();
};
-}(
jQuery, mediaWiki
) );
+}() );