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
▲/*
▲ * 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 );
|