Utente:Daimona Eaytoy/Massblock.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m -
m +jquery, fix globale non disponibile
Riga 10:
( function( mw, $ ) {
// OOUI element
var submitBtn;,
// Ideally this would use $wgBlockAllowsUTEdit, but it's not available.
blockAllowsTalkEdit = mw.config.get( 'wgWikiName' ) !== 'it';
 
/**
Riga 40 ⟶ 42:
wpMassBlockEmail = $( "#wpMassBlockEmail input" ).prop( 'checked' ),
wpMassBlockAutoblock = $( "#wpMassBlockAutoblock input" ).prop( 'checked' ),
wpMassBlockTalkpage = mw.config.get( 'wgBlockAllowsUTEdit' ) === trueblockAllowsTalkEdit ? $( "#wpMassBlockTalkpage input" ).prop( 'checked' ) : false,
wpMassBlockReblock = $( "#wpMassBlockReblock input" ).prop( 'checked' );
var wpMassBlockMessage = $( "#wpMassBlockMessage textarea" ).val().trim(),
Riga 157 ⟶ 159:
linkedList += "<li><a href=\"" + mw.config.get( 'wgScript' ) + "?title=" + encodeURIComponent( failed[ x ] ) + "\">" + failed[ x ] + "</a>: <code style=\"color:red\">" + error[ x ] + "</code></li>";
}
document.getElementById$( "#wpMassBlockFailedContainer" ).innerHTML +=html(
'<br /><b>' + msg[ 'failed-actions' ] + '</b> ' +
'(<a href="//www.mediawiki.org/wiki/API:Block#Possible_errors">' + msg[ 'failure-help' ] + '</a>)' +
'<ul>' + linkedList + '</ul>';
);
}
}
Riga 191 ⟶ 194:
title: title,
protections: 'edit=sysop|move=sysop|create=sysop', ////////////////////////////////////////////////////////////////fixme
reason: document.getElementById$( "#wpMassBlockProtectReason input" ).valueval().trim(),
watchlist: 'nochange',
format: 'json',
Riga 420 ⟶ 423:
label: msg[ 'noemail' ]
}
),
];
new OO.ui.FieldLayout(
if ( blockAllowsTalkEdit ) {
blockOptsArray.push( new OO.ui.FieldLayout(
new OO.ui.CheckboxInputWidget( {
id: 'wpMassBlockTalkpage'
Riga 427 ⟶ 433:
label: msg[ 'notalk' ]
}
), );
}
new OO.ui.FieldLayout(
blockOptsArray.push ( new OO.ui.FieldLayout(
new OO.ui.CheckboxInputWidget( {
id: 'wpMassBlockReblock',
Riga 436 ⟶ 444:
}
)
]);
 
var blockOpts = new OO.ui.FieldsetLayout( {