Index: trunk/phase3/skins/common/protect.js |
— | — | @@ -252,7 +252,7 @@ |
253 | 253 | */ |
254 | 254 | 'getLevelSelectors': function() { |
255 | 255 | var all = document.getElementsByTagName("select"); |
256 | | - var ours = new Array(); |
| 256 | + var ours = []; |
257 | 257 | for (var i = 0; i < all.length; i++) { |
258 | 258 | var element = all[i]; |
259 | 259 | if (element.id.match(/^mwProtect-level-/)) { |
— | — | @@ -281,7 +281,7 @@ |
282 | 282 | */ |
283 | 283 | 'getExpiryInputs': function() { |
284 | 284 | var all = document.getElementsByTagName("input"); |
285 | | - var ours = new Array(); |
| 285 | + var ours = []; |
286 | 286 | for (var i = 0; i < all.length; i++) { |
287 | 287 | var element = all[i]; |
288 | 288 | if (element.name.match(/^mwProtect-expiry-/)) { |
— | — | @@ -309,7 +309,7 @@ |
310 | 310 | */ |
311 | 311 | 'getExpirySelectors': function() { |
312 | 312 | var all = document.getElementsByTagName("select"); |
313 | | - var ours = new Array(); |
| 313 | + var ours = []; |
314 | 314 | for (var i = 0; i < all.length; i++) { |
315 | 315 | var element = all[i]; |
316 | 316 | if (element.id.match(/^mwProtectExpirySelection-/)) { |
Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -319,7 +319,7 @@ |
320 | 320 | link.setAttribute( 'title', tooltip ); |
321 | 321 | } |
322 | 322 | if ( accesskey && tooltip ) { |
323 | | - updateTooltipAccessKeys( new Array( link ) ); |
| 323 | + updateTooltipAccessKeys( [link] ); |
324 | 324 | } |
325 | 325 | |
326 | 326 | if ( nextnode && nextnode.parentNode == node ) { |
— | — | @@ -445,7 +445,7 @@ |
446 | 446 | From http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ |
447 | 447 | */ |
448 | 448 | window.getElementsByClassName = function( oElm, strTagName, oClassNames ) { |
449 | | - var arrReturnElements = new Array(); |
| 449 | + var arrReturnElements = []; |
450 | 450 | if ( typeof( oElm.getElementsByClassName ) == 'function' ) { |
451 | 451 | /* Use a native implementation where possible FF3, Saf3.2, Opera 9.5 */ |
452 | 452 | var arrNativeReturn = oElm.getElementsByClassName( oClassNames ); |
— | — | @@ -460,7 +460,7 @@ |
461 | 461 | return arrReturnElements; |
462 | 462 | } |
463 | 463 | var arrElements = ( strTagName == '*' && oElm.all ) ? oElm.all : oElm.getElementsByTagName( strTagName ); |
464 | | - var arrRegExpClassNames = new Array(); |
| 464 | + var arrRegExpClassNames = []; |
465 | 465 | if( typeof oClassNames == 'object' ) { |
466 | 466 | for( var i = 0; i < oClassNames.length; i++ ) { |
467 | 467 | arrRegExpClassNames[arrRegExpClassNames.length] = |
— | — | @@ -667,4 +667,4 @@ |
668 | 668 | |
669 | 669 | if ( ie6_bugs ) { |
670 | 670 | importScriptURI( stylepath + '/common/IEFixes.js' ); |
671 | | -} |
\ No newline at end of file |
| 671 | +} |