MediaWiki:Gadget-twinkleprotect.js: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
m (1 revision)
imported>Mlpearc
m (Text replace - "WP" to "EFD")
Line 30: Line 30:
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Protection templates", "Template:Protection templates" );
Window.addFooterLink( "Protection templates", "Template:Protection templates" );
Window.addFooterLink( "Protection policy", "WP:PROT" );
Window.addFooterLink( "Protection policy", "EFD:PROT" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#protect" );
Window.addFooterLink( "Twinkle help", "EFD:TW/DOC#protect" );


var form = new Morebits.quickForm( Twinkle.protect.callback.evaluate );
var form = new Morebits.quickForm( Twinkle.protect.callback.evaluate );
Line 61: Line 61:
label: 'Request page protection',
label: 'Request page protection',
value: 'request',
value: 'request',
tooltip: 'If you want to request protection via WP:RPP' + (Morebits.userIsInGroup('sysop') ? ' instead of doing the protection by yourself.' : '.'),
tooltip: 'If you want to request protection via EFD:RPP' + (Morebits.userIsInGroup('sysop') ? ' instead of doing the protection by yourself.' : '.'),
checked: !Morebits.userIsInGroup('sysop')
checked: !Morebits.userIsInGroup('sysop')
},
},
Line 631: Line 631:
edit: 'sysop',
edit: 'sysop',
move: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Content disputes|Edit warring / Content dispute]]'
reason: '[[EFD:PP#Content disputes|Edit warring / Content dispute]]'
},
},
'pp-vandalism': {
'pp-vandalism': {
edit: 'sysop',
edit: 'sysop',
move: 'sysop',
move: 'sysop',
reason: 'Persistent [[WP:Vandalism|vandalism]]'
reason: 'Persistent [[EFD:Vandalism|vandalism]]'
},
},
'pp-template': {
'pp-template': {
edit: 'sysop',
edit: 'sysop',
move: 'sysop',
move: 'sysop',
reason: '[[WP:High-risk templates|Highly visible template]]'
reason: '[[EFD:High-risk templates|Highly visible template]]'
},
},
'pp-usertalk': {
'pp-usertalk': {
edit: 'sysop',
edit: 'sysop',
move: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
reason: '[[EFD:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
},
},
'pp-semi-vandalism': {
'pp-semi-vandalism': {
edit: 'autoconfirmed',
edit: 'autoconfirmed',
reason: 'Persistent [[WP:Vandalism|vandalism]]',
reason: 'Persistent [[EFD:Vandalism|vandalism]]',
template: 'pp-vandalism'
template: 'pp-vandalism'
},
},
'pp-semi-blp': {
'pp-semi-blp': {
edit: 'autoconfirmed',
edit: 'autoconfirmed',
reason: 'Violations of the [[WP:Biographies of living persons|biographies of living persons policy]]'
reason: 'Violations of the [[EFD:Biographies of living persons|biographies of living persons policy]]'
},
},
'pp-semi-usertalk': {
'pp-semi-usertalk': {
edit: 'autoconfirmed',
edit: 'autoconfirmed',
move: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
reason: '[[EFD:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
},
},
'pp-semi-template': { // removed for now
'pp-semi-template': { // removed for now
edit: 'autoconfirmed',
edit: 'autoconfirmed',
move: 'sysop',
move: 'sysop',
reason: '[[WP:High-risk templates|Highly visible template]]',
reason: '[[EFD:High-risk templates|Highly visible template]]',
template: 'pp-template'
template: 'pp-template'
},
},
'pp-semi-sock': {
'pp-semi-sock': {
edit: 'autoconfirmed',
edit: 'autoconfirmed',
reason: 'Persistent [[WP:Sock puppetry|sock puppetry]]'
reason: 'Persistent [[EFD:Sock puppetry|sock puppetry]]'
},
},
'pp-semi-protected': {
'pp-semi-protected': {
Line 679: Line 679:
'pp-pc-vandalism': {
'pp-pc-vandalism': {
stabilize: 'autoconfirmed', // stabilize = Pending Changes
stabilize: 'autoconfirmed', // stabilize = Pending Changes
reason: 'Persistent [[WP:Vandalism|vandalism]]',
reason: 'Persistent [[EFD:Vandalism|vandalism]]',
template: 'pp-pc1'
template: 'pp-pc1'
},
},
'pp-pc-blp': {
'pp-pc-blp': {
stabilize: 'autoconfirmed',
stabilize: 'autoconfirmed',
reason: 'Violations of the [[WP:BLP|biographies of living persons policy]]',
reason: 'Violations of the [[EFD:BLP|biographies of living persons policy]]',
template: 'pp-pc1'
template: 'pp-pc1'
},
},
Line 698: Line 698:
'pp-move-dispute': {
'pp-move-dispute': {
move: 'sysop',
move: 'sysop',
reason: '[[WP:MOVP|Move warring]]'
reason: '[[EFD:MOVP|Move warring]]'
},
},
'pp-move-vandalism': {
'pp-move-vandalism': {
move: 'sysop',
move: 'sysop',
reason: '[[WP:MOVP|Page-move vandalism]]'
reason: '[[EFD:MOVP|Page-move vandalism]]'
},
},
'pp-move-indef': {
'pp-move-indef': {
move: 'sysop',
move: 'sysop',
reason: '[[WP:MOVP|Highly visible page]]'
reason: '[[EFD:MOVP|Highly visible page]]'
},
},
'unprotect': {
'unprotect': {
Line 718: Line 718:
'pp-create-offensive': {
'pp-create-offensive': {
create: 'sysop',
create: 'sysop',
reason: '[[WP:SALT|Offensive name]]'
reason: '[[EFD:SALT|Offensive name]]'
},
},
'pp-create-salt': {
'pp-create-salt': {
create: 'sysop',
create: 'sysop',
reason: '[[WP:SALT|Repeatedly recreated]]'
reason: '[[EFD:SALT|Repeatedly recreated]]'
},
},
'pp-create-blp': {
'pp-create-blp': {
create: 'sysop',
create: 'sysop',
reason: '[[WP:BLPDEL|Recently deleted BLP]]'
reason: '[[EFD:BLPDEL|Recently deleted BLP]]'
},
},
'pp-create': {
'pp-create': {
Line 1,060: Line 1,060:
case 'pp-semi-blp':
case 'pp-semi-blp':
case 'pp-pc-blp':
case 'pp-pc-blp':
typereason = '[[WP:BLP|BLP]] policy violations';
typereason = '[[EFD:BLP|BLP]] policy violations';
break;
break;
case 'pp-move-dispute':
case 'pp-move-dispute':
Line 1,075: Line 1,075:
break;
break;
case 'pp-create-blp':
case 'pp-create-blp':
typereason = 'Recently deleted [[WP:BLP|BLP]]';
typereason = 'Recently deleted [[EFD:BLP|BLP]]';
break;
break;
case 'pp-create-salt':
case 'pp-create-salt':
Line 1,106: Line 1,106:
Morebits.status.init( form );
Morebits.status.init( form );


rppName = 'Wikipedia:Requests for page protection';
rppName = 'Everything Food & Drink:Requests for page protection';


// Updating data for the action completed event
// Updating data for the action completed event
Line 1,264: Line 1,264:
linknode.setAttribute("href", mw.util.wikiGetlink("Wikipedia:Twinkle/Fixing RPP") );
linknode.setAttribute("href", mw.util.wikiGetlink("Wikipedia:Twinkle/Fixing RPP") );
linknode.appendChild(document.createTextNode('How to fix RPP'));
linknode.appendChild(document.createTextNode('How to fix RPP'));
statusElement.error( [ 'Could not find relevant heading on WP:RPP. To fix this problem, please see ', linknode, '.' ] );
statusElement.error( [ 'Could not find relevant heading on MYW:RPP. To fix this problem, please see ', linknode, '.' ] );
return;
return;
}
}