MediaWiki:Common.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
+1
m Load order optimization; minor
Riga 6:
if (mw.config.get('wgIsMainPage') && top != self)
top.___location.replace('http://toolserver.org/~pietrodn/wikipedia_redirect.php');
 
/*
* Redirect bad mirrors to it.wikipedia.org
* [[m:User:Hoo man]]
*/
( function( mw ) {
var i, isBad,
badMirrors = [
'wikipedia.sapere.alice.it',
'wikipedia.deejay.it',
'wikipedia.kataweb.it',
];
for( i = 0; i < badMirrors.length; i++ ) {
if ( document.___location.href.indexOf( badMirrors[ i ] ) !== -1 ) {
isBad = true;
break;
}
}
if ( isBad ) {
// redirect users to the same page on itwiki
document.___location.href = '//it.wikipedia.org/wiki/' + mw.config.get( 'wgPageName' );
/*
// redirect users to a landing page
document.___location.href = '//it.wikipedia.org/wiki/FooBar';
*/
}
} )( mediaWiki );
 
//DEPRECATO
Riga 837 ⟶ 864:
 
//REFERENCE TOOLTIP
importScriptURImw.loader.load("//it.wikipedia.org/w/index.php?title=Wikipedia:Monobook.js/ReferenceTooltip.js&action=raw&ctype=text/javascript&dontcountme=s");
 
/*
* Redirect bad mirrors to it.wikipedia.org
* [[m:User:Hoo man]]
*/
( function( mw ) {
var i, isBad,
badMirrors = [
'wikipedia.sapere.alice.it',
'wikipedia.deejay.it',
'wikipedia.kataweb.it',
];
for( i = 0; i < badMirrors.length; i++ ) {
if ( document.___location.href.indexOf( badMirrors[ i ] ) !== -1 ) {
isBad = true;
break;
}
}
if ( isBad ) {
// redirect users to the same page on itwiki
document.___location.href = '//it.wikipedia.org/wiki/' + mw.config.get( 'wgPageName' );
/*
// redirect users to a landing page
document.___location.href = '//it.wikipedia.org/wiki/FooBar';
*/
}
} )( mediaWiki );