Utente:Daimona Eaytoy/Massblock.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m tweak expiry |
m Beautify, -controllo non necessario |
||
Riga 44:
for ( i = 0; i < users.length; i++ ) {
var user = users[ i ].trim();
▲ var api = new mw.Api();
▲ api.postWithToken( "csrf", {
▲ action: 'block',
▲ allowusertalk: wpMassBlockTalkpage,
▲ autoblock: wpMassBlockAutoblock,
▲ nocreate: wpMassBlockNocreate,
▲ expiry: wpMassBlockExpiry === "" ? "indefinite" : wpMassBlockExpiry,
noemail: wpMassBlockEmail,
▲ anononly: wpMassBlockAnononly,
user: user
▲ reason: wpMassBlockReasons === "other" ? wpMassBlockReason : wpMassBlockReasons + ( wpMassBlockReason ? ": " + wpMassBlockReason : "" ),
console.log(data);▼
▲ var isInfty = isInfinity( wpMassBlockExpiry );
▲ blocked++;
.fail( function( e ) {▼
▲ //If not edited, add the title to the "failed" array and a description of the error to the "error" array.
▲ // No pages should be protected, and the UP should be left as is
}▼
}▼
▲ if ( wpMassBlockTag !== "" ) {
doEditPage( 'User:' + user, wpMassBlockTag, wpMassBlockSummaryUser )▼
▲ .done( function( data ) {
userpageedited++;▼
} )▼
.fail( function( e ) {▼
//If not edited, add the title to the "failed" array and a description of the error to the "error" array.▼
▲ failed.push( 'User:' + user );
error.push( e );▼
▲ } );
}▼
if ( wpMassBlockProtectUserPage ) {▼
doProtectPage( 'User:' + user )▼
.done( function( data ) {▼
userpageprotected++;▼
} )▼
.fail( function( e ) {▼
//If not edited, add the title to the "failed" array and a description of the error to the "error" array.▼
failed.push( 'User:' + user );▼
error.push( e );▼
} );▼
}▼
},▼
function( e ) {console.log(e);▼
// If not blocked, add the title to the "failed" array and a description of the error to the "error" array.▼
failed.push( "Special:Block/" + user );▼
error.push( e );▼
}
if ( wpMassBlockTag !== "" ) {
);▼
▲
▲
failed.push( 'User:' + user );
▲ } );
▲
}
Riga 256:
msg[ 'upmsg' ] + '<br />' +
'<textarea tabindex="3" accesskey="," name="wpMassBlockTag" id="wpMassBlockTag" rows="10" cols="80"></textarea>' +
'<br /><br /><fieldset><legend>' + msg[ 'block-options-label' ] + '</legend>' +
'<table style="background-color:transparent">' +
'<tr><td>' + msg[ 'common-reasons' ] + '</td>' +
Riga 282:
'<tr><td>' + msg[ 'override' ] + '</td><td><input type="checkbox" id="wpMassBlockReblock" name="wpMassBlockReblock" checked="checked" /></td></tr>' +
'</table></fieldset>' +
'<fieldset><legend>' + msg[ 'further-options-label' ] + '</legend>' +
'<table style="background-color:transparent">' +
'<tr><td>' + msg[ 'talksummary' ] + '</td>' +
'<td><input type="text" id="wpMassBlockSummaryTalk" name="wpMassBlockSummaryTalk" maxlength="255" value="' +
msg[ 'summary-default' ] + '"/></td></tr>' +
'<tr><td>' + msg[ 'talkprotect' ] + '</td>' +
'<td><input type="checkbox" id="wpMassBlockProtectTalk" name="wpMassBlockProtectTalk" /></td></tr>' +
'<tr><td>' + msg[ 'upsummary' ] + '</td>' +
'<td><input type="text" id="wpMassBlockSummaryUser" name="wpMassBlockSummaryUser" maxlength="255" value="' +
msg[ 'summary-default' ] + '"/></td></tr>' +
'<tr><td>' + msg[ 'upprotect' ] + '</td>' +
'<td><input type="checkbox" id="wpMassBlockProtectUser" name="wpMassBlockProtectUser" /></td></tr>';
|