MediaWiki:Gadget-Massblock.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m -codice di debug
+opzione per bloccare la talk anche qui
 
(3 versioni intermedie di uno stesso utente non sono mostrate)
Riga 54:
// OOUI element
var submitBtn,
// Ideally this would use $wgBlockAllowsUTEdit, but it's not available in JS.
blockAllowsTalkEdit = window.___location.href.indexOf( 'it.wikipedia' ) === -1true,
mwapi = new mw.Api();
 
Riga 108:
this.protectReason = $( "#wpMassBlockProtectReason input" ).val().trim();
 
this.isInfty = isInfinity( wpMassBlockExpirythis.expiry );
// Several actions can only be executed if the block is infinite
this.protectTalk = $( "#wpMassBlockProtectTalk input" ).prop( 'checked' ) && this.isInfty;
Riga 127:
return doProtectPage( page, 'edit=sysop|move=sysop' )
.done( function() {
this[counter]++;
} )
.fail( function( e ) {
Riga 144:
this.talkpageedited++;
if ( FormData.protectTalk ) {
return this._protect( talkPage, true, this.'talkpageprotected', user );
}
}.bind( this ),
Riga 162:
function( data ) {
var exists = Object.keys( data.query.pages )[ 0 ] !== -1;
return this._protect( talkPage, exists, this.'talkpageprotected', user );
}.bind( this ),
function( e ) {
Riga 177:
this.userpageedited++;
if ( FormData.protectUser ) {
return this._protect( userPage, true, this.'userpageprotected', user );
}
}.bind( this ),
Riga 195:
function( data ) {
var exists = Object.keys( data.query.pages )[ 0 ] !== -1;
return this._protect( userPage, exists, this.'userpageprotected', user );
}.bind( this ),
function( e ) {
Riga 721:
} );
} else {
mw.util.addPortletLink( 'p-tb', mw.configutil.getgetUrl( 'wgScript' ) + '?title=Special:Massblock' ), msg( 'toolbar-text' ) );
}
} );