MediaWiki:Common.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
riscritta funzionalità RealTitleBanner con jQuery
m fix spazi, MediaWiki
Riga 6:
* [[m:User:Hoo man]]
*/
( function( mw ) {
var i, isBad,
badMirrors = [
Riga 14:
'213.92.16.218',
];
for ( i = 0; i < badMirrors.length; i++ ) {
if ( document.___location.href.indexOf( badMirrors[ i ] ) !== -1 ) {
isBad = true;
Riga 26:
document.___location.href = '//it.wikipedia.org/wiki/Wikipedia:Live_mirror';
}
} )( mediaWiki );
 
 
Riga 56:
 
function checkRealTitleBanner() {
var $realTitleBanner = $( '#RealTitleBanner' ), $realTitle, $firstH1;
if ( $realTitleBanner.length && !$( '#DisableRealTitle' ).length ) {
$realTitle = $realTitleBanner.find( '#RealTitle' );
$firstH1 = $( 'h1:first' );
Riga 368:
* Toglie "Soggetto/Intestazione" nelle creazioni delle discussioni al Bar
*/
if ( mw.config.get( 'wgNamespaceNumber' ) === 4 &&
mw.config.get( 'wgPageName' ).indexOf( 'Wikipedia:Bar/' ) === 0 &&
mw.config.get( 'wgAction' ) === 'edit' &&
document.___URL.indexOf( '&section=new&preload=' ) !== -1) {
$( function () {
document.getElementById( 'wpSummaryLabel' ).style.display = 'none';
Riga 419:
'&params=' + geohackParams +
'&title=' + mw.util.wikiUrlencode( mw.config.get( 'wgTitle' ) ) +
( window.___location.protocol === 'https:' ? '&secure=1' : '' );
$iframe = $( '<iframe>' )
.attr( 'src', url )