69
edits
m (1 revision imported) |
m (1 revision imported) |
||
(One intermediate revision by the same user not shown) | |||
Line 100: | Line 100: | ||
// Current protection level in a human-readable format | // Current protection level in a human-readable format | ||
// (a string, or null if no protection; only filled for sysops) | // (a string, or null if no protection; only filled for sysops) | ||
Twinkle.protect.protectionLevel = null; | Twinkle.protect.protectionLevel = null; | ||
// Contains the current protection level in an object | // Contains the current protection level in an object | ||
// Once filled, it will look something like: | // Once filled, it will look something like: | ||
Line 641: | Line 641: | ||
{ label: 'Generic (semi)', value: 'pp-semi-protected' }, | { label: 'Generic (semi)', value: 'pp-semi-protected' }, | ||
{ label: 'Persistent vandalism (semi)', selected: true, value: 'pp-semi-vandalism' }, | { label: 'Persistent vandalism (semi)', selected: true, value: 'pp-semi-vandalism' }, | ||
{ label: 'Disruptive editing (semi)', value: 'pp-semi-disruptive' }, | |||
{ label: 'Adding unsourced content (semi)', value: 'pp-semi-unsourced' }, | |||
{ label: 'BLP policy violations (semi)', value: 'pp-semi-blp' }, | { label: 'BLP policy violations (semi)', value: 'pp-semi-blp' }, | ||
{ label: 'Sockpuppetry (semi)', value: 'pp-semi-sock' }, | { label: 'Sockpuppetry (semi)', value: 'pp-semi-sock' }, | ||
Line 722: | Line 724: | ||
reason: 'Persistent [[WP:Vandalism|vandalism]]', | reason: 'Persistent [[WP:Vandalism|vandalism]]', | ||
template: 'pp-vandalism' | template: 'pp-vandalism' | ||
}, | |||
'pp-semi-disruptive': { | |||
edit: 'autoconfirmed', | |||
reason: 'Persistent [[WP:Disruptive editing|disruptive editing]]', | |||
template: 'pp-protected' | |||
}, | |||
'pp-semi-unsourced': { | |||
edit: 'autoconfirmed', | |||
reason: 'Persistent addition of [[WP:INTREF|unsourced or poorly sourced content]]', | |||
template: 'pp-protected' | |||
}, | }, | ||
'pp-semi-blp': { | 'pp-semi-blp': { | ||
Line 1,084: | Line 1,096: | ||
break; | break; | ||
case 'pp-semi-vandalism': | case 'pp-semi-vandalism': | ||
case 'pp-semi-disruptive': | |||
case 'pp-semi-unsourced': | |||
case 'pp-semi-usertalk': | case 'pp-semi-usertalk': | ||
case 'pp-semi-sock': | case 'pp-semi-sock': | ||
Line 1,121: | Line 1,135: | ||
case 'pp-pc-vandalism': | case 'pp-pc-vandalism': | ||
typereason = 'Persistent vandalism'; | typereason = 'Persistent vandalism'; | ||
break; | |||
case 'pp-semi-disruptive': | |||
typereason = 'Persistent [[Wikipedia:Disruptive editing|disruptive editing]]'; | |||
break; | |||
case 'pp-semi-unsourced': | |||
typereason = 'Persistent addition of [[WP:INTREF|unsourced or poorly sourced content]]'; | |||
break; | break; | ||
case 'pp-template': | case 'pp-template': | ||
Line 1,365: | Line 1,385: | ||
Twinkle.protect.currentProtectionLevels.stabilize.level); | Twinkle.protect.currentProtectionLevels.stabilize.level); | ||
if (computeWeight(protInfo.edit, protInfo.stabilize) > editWeight || | if (computeWeight(protInfo.edit, protInfo.stabilize) > editWeight || | ||
computeWeight(protInfo.move) > computeWeight(Twinkle.protect.currentProtectionLevels.move && | computeWeight(protInfo.move) > computeWeight(Twinkle.protect.currentProtectionLevels.move && | ||
Twinkle.protect.currentProtectionLevels.move.level) || | Twinkle.protect.currentProtectionLevels.move.level) || | ||
computeWeight(protInfo.create) > computeWeight(Twinkle.protect.currentProtectionLevels.create && | computeWeight(protInfo.create) > computeWeight(Twinkle.protect.currentProtectionLevels.create && | ||
Twinkle.protect.currentProtectionLevels.create.level)) { | Twinkle.protect.currentProtectionLevels.create.level)) { | ||
increase = true; | increase = true; |