mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-24 00:06:49 +00:00
Replace deprecated jQuery.isArray with Array.isArray
jQuery.isArray was deprecated in jQuery 3.2.0. [1] Array.isArray is part of ES5 and MediaWiki 1.29+ which ensures that JavaScript is only used when the browser supports ES5. (T128115) Performed using: find . -type f -name \*.js -exec sed -i -e 's/\$\.isArray/Array.isArray/g' {} \; [1] https://blog.jquery.com/2017/03/16/jquery-3-2-0-is-out/ [2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Browser_compatibility Change-Id: Ia1a118fefb23761fe297647442f0a598a9488968
This commit is contained in:
parent
bf7e63d77b
commit
24ee938095
|
@ -1013,19 +1013,11 @@
|
|||
browsers: {
|
||||
// Left-to-right languages
|
||||
ltr: {
|
||||
msie: [ [ '>=', 11 ] ], // Known to work on 11.
|
||||
firefox: [ [ '>=', 2 ] ],
|
||||
opera: false,
|
||||
safari: [ [ '>=', 3 ] ],
|
||||
chrome: [ [ '>=', 3 ] ]
|
||||
msie: [ [ '>=', 11 ] ] // Known to work on 11.
|
||||
},
|
||||
// Right-to-left languages
|
||||
rtl: {
|
||||
msie: [ [ '>=', 11 ] ], // Works on 11 but dialog positioning is cruddy.
|
||||
firefox: [ [ '>=', 2 ] ],
|
||||
opera: false,
|
||||
safari: [ [ '>=', 3 ] ],
|
||||
chrome: [ [ '>=', 3 ] ]
|
||||
msie: [ [ '>=', 11 ] ] // Works on 11 but dialog positioning is cruddy.
|
||||
}
|
||||
},
|
||||
titleMsg: 'wikieditor-toolbar-tool-replace-title',
|
||||
|
|
|
@ -11,35 +11,19 @@
|
|||
browsers: {
|
||||
// Left-to-right languages
|
||||
ltr: {
|
||||
msie: [ [ '>=', 7 ] ],
|
||||
// jQuery UI appears to be broken in FF 2.0 - 2.0.0.4
|
||||
firefox: [
|
||||
[ '>=', 2 ],
|
||||
[ '!=', '2.0' ],
|
||||
[ '!=', '2.0.0.1' ],
|
||||
[ '!=', '2.0.0.2' ],
|
||||
[ '!=', '2.0.0.3' ],
|
||||
[ '!=', '2.0.0.4' ]
|
||||
],
|
||||
opera: [ [ '>=', 9.6 ] ],
|
||||
safari: [ [ '>=', 3 ] ],
|
||||
chrome: [ [ '>=', 3 ] ]
|
||||
msie: [ [ '>=', 9 ] ],
|
||||
firefox: [ [ '>=', 4 ] ],
|
||||
opera: [ [ '>=', '10.5' ] ],
|
||||
safari: [ [ '>=', 5 ] ],
|
||||
chrome: [ [ '>=', 5 ] ]
|
||||
},
|
||||
// Right-to-left languages
|
||||
rtl: {
|
||||
msie: [ [ '>=', 7 ] ],
|
||||
// jQuery UI appears to be broken in FF 2.0 - 2.0.0.4
|
||||
firefox: [
|
||||
[ '>=', 2 ],
|
||||
[ '!=', '2.0' ],
|
||||
[ '!=', '2.0.0.1' ],
|
||||
[ '!=', '2.0.0.2' ],
|
||||
[ '!=', '2.0.0.3' ],
|
||||
[ '!=', '2.0.0.4' ]
|
||||
],
|
||||
opera: [ [ '>=', 9.6 ] ],
|
||||
safari: [ [ '>=', 3 ] ],
|
||||
chrome: [ [ '>=', 3 ] ]
|
||||
msie: [ [ '>=', 9 ] ],
|
||||
firefox: [ [ '>=', 4 ] ],
|
||||
opera: [ [ '>=', '10.5' ] ],
|
||||
safari: [ [ '>=', 5 ] ],
|
||||
chrome: [ [ '>=', 5 ] ]
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -63,15 +63,11 @@
|
|||
browsers: {
|
||||
// Left-to-right languages
|
||||
ltr: {
|
||||
// The toolbar layout is broken in IE6
|
||||
msie: [ [ '>=', 7 ] ],
|
||||
// Layout issues in FF < 2
|
||||
firefox: [ [ '>=', 2 ] ],
|
||||
// Text selection bugs galore
|
||||
opera: [ [ '>=', 9.6 ] ],
|
||||
// jQuery minimums
|
||||
safari: [ [ '>=', 3 ] ],
|
||||
chrome: [ [ '>=', 3 ] ],
|
||||
msie: [ [ '>=', 9 ] ],
|
||||
firefox: [ [ '>=', 4 ] ],
|
||||
opera: [ [ '>=', '10.5' ] ],
|
||||
safari: [ [ '>=', 5 ] ],
|
||||
chrome: [ [ '>=', 5 ] ],
|
||||
netscape: [ [ '>=', 9 ] ],
|
||||
blackberry: false,
|
||||
ipod: [ [ '>=', 6 ] ],
|
||||
|
@ -79,15 +75,11 @@
|
|||
},
|
||||
// Right-to-left languages
|
||||
rtl: {
|
||||
// The toolbar layout is broken in IE 7 in RTL mode, and IE6 in any mode
|
||||
msie: [ [ '>=', 8 ] ],
|
||||
// Layout issues in FF < 2
|
||||
firefox: [ [ '>=', 2 ] ],
|
||||
// Text selection bugs galore
|
||||
opera: [ [ '>=', 9.6 ] ],
|
||||
// jQuery minimums
|
||||
safari: [ [ '>=', 3 ] ],
|
||||
chrome: [ [ '>=', 3 ] ],
|
||||
msie: [ [ '>=', 9 ] ],
|
||||
firefox: [ [ '>=', 4 ] ],
|
||||
opera: [ [ '>=', '10.5' ] ],
|
||||
safari: [ [ '>=', 5 ] ],
|
||||
chrome: [ [ '>=', 5 ] ],
|
||||
netscape: [ [ '>=', 9 ] ],
|
||||
blackberry: false,
|
||||
ipod: [ [ '>=', 6 ] ],
|
||||
|
@ -171,7 +163,7 @@
|
|||
return object[ property ];
|
||||
} else if ( property + 'Msg' in object ) {
|
||||
p = object[ property + 'Msg' ];
|
||||
if ( $.isArray( p ) && p.length >= 2 ) {
|
||||
if ( Array.isArray( p ) && p.length >= 2 ) {
|
||||
return mw.message.apply( mw.message, p ).text();
|
||||
} else {
|
||||
return mw.message( p ).text();
|
||||
|
|
|
@ -8,17 +8,19 @@
|
|||
browsers: {
|
||||
// Left-to-right languages
|
||||
ltr: {
|
||||
msie: [ [ '>=', 7 ] ],
|
||||
firefox: [ [ '>=', 3 ] ],
|
||||
opera: [ [ '>=', 9.6 ] ],
|
||||
safari: [ [ '>=', 4 ] ]
|
||||
msie: [ [ '>=', 9 ] ],
|
||||
firefox: [ [ '>=', 4 ] ],
|
||||
opera: [ [ '>=', '10.5' ] ],
|
||||
safari: [ [ '>=', 5 ] ],
|
||||
chrome: [ [ '>=', 5 ] ]
|
||||
},
|
||||
// Right-to-left languages
|
||||
rtl: {
|
||||
msie: [ [ '>=', 8 ] ],
|
||||
firefox: [ [ '>=', 3 ] ],
|
||||
opera: [ [ '>=', 9.6 ] ],
|
||||
safari: [ [ '>=', 4 ] ]
|
||||
msie: [ [ '>=', 9 ] ],
|
||||
firefox: [ [ '>=', 4 ] ],
|
||||
opera: [ [ '>=', '10.5' ] ],
|
||||
safari: [ [ '>=', 5 ] ],
|
||||
chrome: [ [ '>=', 5 ] ]
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -9,17 +9,19 @@
|
|||
browsers: {
|
||||
// Left-to-right languages
|
||||
ltr: {
|
||||
msie: [ [ '>=', 7 ] ],
|
||||
firefox: [ [ '>=', 3 ] ],
|
||||
opera: [ [ '>=', 9.6 ] ],
|
||||
safari: [ [ '>=', 4 ] ]
|
||||
msie: [ [ '>=', 9 ] ],
|
||||
firefox: [ [ '>=', 4 ] ],
|
||||
opera: [ [ '>=', '10.5' ] ],
|
||||
safari: [ [ '>=', 5 ] ],
|
||||
chrome: [ [ '>=', 5 ] ]
|
||||
},
|
||||
// Right-to-left languages
|
||||
rtl: {
|
||||
msie: [ [ '>=', 8 ] ],
|
||||
firefox: [ [ '>=', 3 ] ],
|
||||
opera: [ [ '>=', 9.6 ] ],
|
||||
safari: [ [ '>=', 4 ] ]
|
||||
msie: [ [ '>=', 9 ] ],
|
||||
firefox: [ [ '>=', 4 ] ],
|
||||
opera: [ [ '>=', '10.5' ] ],
|
||||
safari: [ [ '>=', 5 ] ],
|
||||
chrome: [ [ '>=', 5 ] ]
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue