Revision as of 18:30, 25 March 2006 view sourceSplash (talk | contribs)33,425 editsm update prot script← Previous edit |
Revision as of 02:52, 3 June 2006 view source Splash (talk | contribs)33,425 edits update prot script, courtesy of VoANext edit → |
Line 851: |
Line 851: |
|
} |
|
} |
|
}); |
|
}); |
|
|
|
|
//<nowiki> ============= test-n.js ============== |
|
|
|
//<pre><nowiki> |
|
|
//Helper tools |
|
|
if (!addTab) |
|
|
{ |
|
|
document.write('<script type="text/javascript" src="' |
|
|
+ 'http://en.wikipedia.org/search/?title=User:Voice_of_All/Addtabs/monobook.js' |
|
|
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); |
|
|
} |
|
|
//END |
|
|
|
|
|
function strip_namespace(target) |
|
|
{ |
|
|
var colon = target.indexOf(':'); |
|
|
if (colon != -1) |
|
|
{ |
|
|
var spaces = new Array('User', 'Misplaced Pages', 'Image', 'MediaWiki', 'Template', 'Help', 'Category'); |
|
|
var ns = target.substring(0, colon); |
|
|
if (ns == '' || ns == 'Talk') |
|
|
return target.substring(colon + 1); |
|
|
else |
|
|
for (var i = 0; i < spaces.length; ++i) |
|
|
{ |
|
|
if (ns == spaces |
|
|
|| ns == spaces + '_talk') |
|
|
return target.substring(colon + 1); |
|
|
} |
|
|
} |
|
|
|
|
|
return target; |
|
|
} |
|
|
//END |
|
|
|
|
|
function jssubmitclose() |
|
|
{ |
|
|
var form = document.getElementById('editform'); |
|
|
form.submit(); |
|
|
setTimeout('window.close()',12000); |
|
|
} |
|
|
//END |
|
|
|
|
|
//Auto-replace |
|
|
function oldautoreplacetxt(what,withw) |
|
|
{ |
|
|
var undefined; |
|
|
i = 1; |
|
|
var original = document.editform.wpTextbox1.value; |
|
|
if (what == ''){alert("Invalid command."); return;} |
|
|
else if (what == 'null'){alert("Action cancelled."); return;} |
|
|
else { |
|
|
if (withw == ''){alert("All such appearances of text will be removed.");} |
|
|
else if (withw.split(what) != undefined) {alert("Action cancelled to avoid infinite loop."); return;} |
|
|
else { |
|
|
if (document.editform.wpTextbox1.value.split(what) != undefined) |
|
|
{ |
|
|
while (i == 1) |
|
|
{ |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace(what, withw); |
|
|
if (document.editform.wpTextbox1.value.indexOf(what) != -1) |
|
|
{i = 1;} |
|
|
else |
|
|
{i = -1;} |
|
|
} |
|
|
} |
|
|
//document.editform.wpSummary.value += 'JS: Replacing text "' + what + '" with "' + withw + '" '; |
|
|
} |
|
|
} |
|
|
} |
|
|
//END |
|
|
|
|
|
//Auto-replace |
|
|
function autoreplacetxt(s,r) |
|
|
{ |
|
|
var original = document.editform.wpTextbox1.value; |
|
|
if(s) |
|
|
{ |
|
|
if(!r && r != '') {alert('Action cancelled.'); return;} |
|
|
var txt = document.editform.wpTextbox1; |
|
|
txt.value = txt.value.replace(new RegExp(s, "g"), r); |
|
|
} |
|
|
} |
|
|
//END |
|
|
|
|
|
// ============= test-n.js ============== |
|
function tnaddlilink(url, name) |
|
function tnaddlilink(url, name) |
|
{ |
|
{ |
Line 864: |
Line 947: |
|
return li; |
|
return li; |
|
} |
|
} |
|
|
//--------------------------------------------------------------- |
|
|
|
|
|
function URLEncoding(input) |
|
|
{ |
|
|
var encodedInputString=escape(input); |
|
|
encodedInputString=encodedInputString.replace("+", "%2B"); |
|
|
encodedInputString=encodedInputString.replace("/", "%2F"); |
|
|
var outputurl=encodedInputString; |
|
|
return outputurl; |
|
|
} |
|
|
//END |
|
addOnloadHook(protection_tabs); |
|
addOnloadHook(protection_tabs); |
|
|
|
|
function protection_tabs() |
|
function protection_tabs() |
|
{ |
|
{ |
Line 876: |
Line 967: |
|
if (document.title.indexOf("Editing ") != -1) |
|
if (document.title.indexOf("Editing ") != -1) |
|
{ |
|
{ |
|
|
document.getElementById('ca-edit').firstChild.innerHTML = 'Edit'; |
|
|
document.getElementById('ca-talk').firstChild.innerHTML = 'Talk'; |
|
if (document.title.indexOf("Editing User talk:") != -1) |
|
if (document.title.indexOf("Editing User talk:") != -1) |
|
{ |
|
{ |
|
tabs.appendChild(tnaddlilink('javascript:usprotect()',"(sp)")); |
|
addTab("javascript:usprotect()", "(s)", "ca-sp", "Semi-protect", ""); |
|
tabs.appendChild(tnaddlilink('javascript:uunprotect()',"(up)")); |
|
|
if(document.getElementById('ca-protect')) |
|
if(document.getElementById('ca-protect')) |
|
{ |
|
{ |
Line 887: |
Line 979: |
|
{ |
|
{ |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
|
addTab("javascript:uunprotect()", "(u)", "ca-up", "Un-protect", ""); |
|
} |
|
} |
|
} |
|
} |
|
else if (document.title.indexOf("Editing User:") != -1) |
|
else if (document.title.indexOf("Editing User:") != -1) |
|
{ |
|
{ |
|
tabs.appendChild(tnaddlilink('javascript:usprotect()',"(sp)")); |
|
addTab("javascript:usprotect()", "(s)", "ca-sp", "Semi-protect", ""); |
|
tabs.appendChild(tnaddlilink('javascript:uunprotect()',"(up)")); |
|
addTab("javascript:ufprotect()", "(p)", "ca-fp", "Full-protect", ""); |
|
if(document.getElementById('ca-protect')) |
|
if(document.getElementById('ca-protect')) |
|
{ |
|
{ |
Line 900: |
Line 993: |
|
{ |
|
{ |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'Protection (on)'; |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'Protection (on)'; |
|
|
addTab("javascript:uunprotect()", "(u)", "ca-up", "Un-protect", ""); |
|
} |
|
} |
|
} |
|
} |
Line 911: |
Line 1,005: |
|
{ |
|
{ |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
} |
|
} |
|
|
tabs.appendChild(tnaddlilink('javascript:rfpps()',"a|s")); |
|
|
tabs.appendChild(tnaddlilink('javascript:rfppp()',"a|p")); |
|
|
tabs.appendChild(tnaddlilink('javascript:rfppm()',"a|m")); |
|
|
tabs.appendChild(tnaddlilink('javascript:rfpprv()',"r|s")); |
|
|
tabs.appendChild(tnaddlilink('javascript:rfppr()',"r|p")); |
|
|
tabs.appendChild(tnaddlilink('javascript:rfppun()',"a|u")); |
|
|
tabs.appendChild(tnaddlilink('javascript:rfppru()',"r|u")); |
|
|
tabs.appendChild(tnaddlilink('javascript:rfppu()',"au")); |
|
} |
|
} |
|
else if (document.title.indexOf("Editing Misplaced Pages:Administrators' noticeboard/3RR (section)") != -1) |
|
else if (document.title.indexOf("Editing Misplaced Pages:Administrators' noticeboard/3RR (section)") != -1) |
Line 947: |
Line 1,049: |
|
} |
|
} |
|
} |
|
} |
|
|
else if(document.title.indexOf("Editing Talk:") != -1 || document.title.indexOf("Editing Misplaced Pages talk:") != -1 || document.title.indexOf("Editing Template talk:") != -1 || document.title.indexOf("Editing MediaWiki talk:") != -1 || document.title.indexOf("Editing Help talk:") != -1 || document.title.indexOf("Editing Portal talk:") != -1 || document.title.indexOf("Editing Image talk:") != -1) |
|
else if(document.title.indexOf("Editing Talk") != -1) |
|
|
{ |
|
{ |
|
tabs.appendChild(tnaddlilink('javascript:oprotect()',"(fp)")); |
|
|
tabs.appendChild(tnaddlilink('javascript:osprotect()',"(sp)")); |
|
|
tabs.appendChild(tnaddlilink('javascript:ounprotect()',"(up)")); |
|
|
if(document.getElementById('ca-protect')) |
|
if(document.getElementById('ca-protect')) |
|
{ |
|
{ |
|
document.getElementById('ca-protect').firstChild.innerHTML = 'P (off)'; |
|
document.getElementById('ca-protect').firstChild.innerHTML = 'P (off)'; |
|
|
addTab("javascript:oprotect()", "(p)", "ca-ofp", "Full-protect", ""); |
|
|
addTab("javascript:osprotect()", "(s)", "ca-osp", "Semi-protect", ""); |
|
} |
|
} |
|
if(document.getElementById('ca-unprotect')) |
|
if(document.getElementById('ca-unprotect')) |
|
{ |
|
{ |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
|
addTab("javascript:oprotect()", "(p)", "ca-ofp", "Full-protect", ""); |
|
|
addTab("javascript:osprotect()", "(s)", "ca-osp", "Semi-protect", ""); |
|
|
addTab("javascript:ounprotect()", "(u)", "ca-oup", "Un-protect", ""); |
|
} |
|
} |
|
if(document.getElementById('ca-edit')) |
|
if(document.getElementById('ca-edit')) |
Line 965: |
Line 1,069: |
|
} |
|
} |
|
} |
|
} |
|
|
else if(document.title.indexOf("Editing Misplaced Pages:") != -1 || document.title.indexOf("Editing Template:") != -1 || document.title.indexOf("Editing Category:") != -1 || document.title.indexOf("Editing MediaWiki:") != -1 || document.title.indexOf("Editing Portal:") != -1 || document.title.indexOf("Editing Help:") != -1 || document.title.indexOf("Editing Image:") != -1) |
|
else if(document.title.indexOf("Editing Misplaced Pages talk") != -1) |
|
|
{ |
|
{ |
|
tabs.appendChild(tnaddlilink('javascript:oprotect()',"(fp)")); |
|
|
tabs.appendChild(tnaddlilink('javascript:osprotect()',"(sp)")); |
|
|
tabs.appendChild(tnaddlilink('javascript:ounprotect()',"(up)")); |
|
|
if(document.getElementById('ca-protect')) |
|
if(document.getElementById('ca-protect')) |
|
{ |
|
{ |
|
document.getElementById('ca-protect').firstChild.innerHTML = 'P (off)'; |
|
document.getElementById('ca-protect').firstChild.innerHTML = 'P (off)'; |
|
|
addTab("javascript:oprotect()", "(p)", "ca-ofp", "Full-protect", ""); |
|
|
addTab("javascript:osprotect()", "(s)", "ca-osp", "Semi-protect", ""); |
|
} |
|
} |
|
if(document.getElementById('ca-unprotect')) |
|
if(document.getElementById('ca-unprotect')) |
|
{ |
|
{ |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
|
addTab("javascript:oprotect()", "(p)", "ca-ofp", "Full-protect", ""); |
|
} |
|
|
|
addTab("javascript:osprotect()", "(s)", "ca-osp", "Semi-protect", ""); |
|
} |
|
|
|
addTab("javascript:ounprotect()", "(u)", "ca-oup", "Un-protect", ""); |
|
else if(document.title.indexOf("Editing Misplaced Pages") != -1) |
|
|
{ |
|
|
tabs.appendChild(tnaddlilink('javascript:oprotect()',"(fp)")); |
|
|
tabs.appendChild(tnaddlilink('javascript:osprotect()',"(sp)")); |
|
|
tabs.appendChild(tnaddlilink('javascript:ounprotect()',"(up)")); |
|
|
if(document.getElementById('ca-protect')) |
|
|
{ |
|
|
document.getElementById('ca-protect').firstChild.innerHTML = 'P (off)'; |
|
|
} |
|
|
if(document.getElementById('ca-unprotect')) |
|
|
{ |
|
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
|
} |
|
|
if(document.getElementById('ca-edit')) |
|
|
{ |
|
|
document.getElementById('ca-edit').firstChild.innerHTML = 'Edit'; |
|
|
} |
|
} |
|
} |
|
} |
|
else |
|
else |
|
{ |
|
{ |
|
tabs.appendChild(tnaddlilink('javascript:protect()',"(fp)")); |
|
|
tabs.appendChild(tnaddlilink('javascript:sprotect()',"(sp)")); |
|
|
tabs.appendChild(tnaddlilink('javascript:unprotect()',"(up)")); |
|
|
if(document.getElementById('ca-protect')) |
|
if(document.getElementById('ca-protect')) |
|
{ |
|
{ |
|
document.getElementById('ca-protect').firstChild.innerHTML = 'P (off)'; |
|
document.getElementById('ca-protect').firstChild.innerHTML = 'P (off)'; |
|
|
addTab("javascript:protect()", "(p)", "ca-fp", "Full-protect", ""); |
|
|
addTab("javascript:sprotect()", "(s)", "ca-sp", "Semi-protect", ""); |
|
} |
|
} |
|
if(document.getElementById('ca-unprotect')) |
|
if(document.getElementById('ca-unprotect')) |
|
{ |
|
{ |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
document.getElementById('ca-unprotect').firstChild.innerHTML = 'P (on)'; |
|
|
addTab("javascript:protect()", "(p)", "ca-fp", "Full-protect", ""); |
|
|
addTab("javascript:sprotect()", "(s)", "ca-sp", "Semi-protect", ""); |
|
|
addTab("javascript:unprotect()", "(u)", "ca-up", "Un-protect", ""); |
|
} |
|
} |
|
if(document.getElementById('ca-edit')) |
|
if(document.getElementById('ca-edit')) |
Line 1,052: |
Line 1,142: |
|
} |
|
} |
|
|
|
|
|
|
//***************************************************** |
|
|
|
|
|
//PROTECTION JS |
|
function protect() |
|
|
|
//***************************************************** |
|
{ |
|
|
|
//***************************************************** |
|
//This is for if people skrew with the WP:PP page layout |
|
//This is for if people skrew with the WP:PP page layout |
|
var movesec = 7; |
|
var movesec = 7; |
Line 1,065: |
Line 1,156: |
|
var anontalk = 19; |
|
var anontalk = 19; |
|
//End of WP:PP constants |
|
//End of WP:PP constants |
|
|
//***************************************************** |
|
var z =''; |
|
|
|
//***************************************************** |
|
var target = document.editform.action; |
|
|
|
function protect() |
|
target = target.substring(target.indexOf('title=') + 6, target.lastIndexOf('&action=submit')); |
|
|
|
{ |
|
|
var message = "Are you sure you want to full-protect this page?"; |
|
|
var return_value = confirm(message); |
|
|
if (return_value == true) |
|
|
{ |
|
|
var z = ''; |
|
|
var target = document.title.split("Editing ").split(" - "); |
|
|
jstarget = URLEncoding(target); |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
{ |
|
{ |
Line 1,102: |
Line 1,201: |
|
else |
|
else |
|
{ |
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
document.editform.wpTextbox1.value = '{{protected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpTextbox1.value = '{{protected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpSummary.value = '+{{protected' + '}}'; |
|
document.editform.wpSummary.value += '+{{protected' + '}}'; |
|
window1 = window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=plist&faketarget=' + target, |
|
window1 = window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=plist&faketarget=' + jstarget, |
|
'targetname', |
|
'targetname', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
window2 = window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect', |
|
window2 = window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jsfprotect', |
|
'targetname2', |
|
'targetname2', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
jssubmitclose(); |
|
return; |
|
return; |
|
} |
|
} |
Line 1,116: |
Line 1,223: |
|
alert("Error: A protection tag is already on this page. If this tag is supposed to be part of the text, then add the desired protection tag manually."); |
|
alert("Error: A protection tag is already on this page. If this tag is supposed to be part of the text, then add the desired protection tag manually."); |
|
return; |
|
return; |
|
|
} |
|
} |
|
} |
|
} |
|
} |
Line 1,121: |
Line 1,229: |
|
function sprotect() |
|
function sprotect() |
|
{ |
|
{ |
|
|
var message = "Are you sure you want to semi-protect this page?"; |
|
//This is for if people skrew with the WP:PP page layout |
|
|
var movesec = 7; |
|
var return_value = confirm(message); |
|
|
if (return_value == true) |
|
var artfull = 10; |
|
|
|
{ |
|
var artsemi = 11; |
|
|
var otherpro = 13; |
|
var z = ''; |
|
|
var target = document.title.split("Editing ").split(" - "); |
|
var userfull = 16; |
|
|
|
jstarget = URLEncoding(target); |
|
var usersemi = 17; |
|
|
var regtalk = 18; |
|
|
var anontalk = 19; |
|
|
//End of WP:PP constants |
|
|
var z =''; |
|
|
var target = document.editform.action; |
|
|
target = target.substring(target.indexOf('title=') + 6, target.lastIndexOf('&action=submit')); |
|
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
{ |
|
{ |
Line 1,168: |
Line 1,270: |
|
else |
|
else |
|
{ |
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
document.editform.wpTextbox1.value = '{{sprotected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpTextbox1.value = '{{sprotected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpSummary.value = '+{{sprotected' + '}}'; |
|
document.editform.wpSummary.value += '+{{sprotected' + '}}'; |
|
window1 = window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=plist&faketarget=' + target, |
|
window1 = window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=plist&faketarget=' + jstarget, |
|
'targetname', |
|
'targetname', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
window2 = window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect', |
|
window2 = window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jssprotect', |
|
'targetname2', |
|
'targetname2', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
jssubmitclose(); |
|
return; |
|
return; |
|
} |
|
} |
Line 1,182: |
Line 1,292: |
|
alert("Error: A protection tag is already on this page. If this tag is supposed to be part of the text, then add the desired protection tag manually."); |
|
alert("Error: A protection tag is already on this page. If this tag is supposed to be part of the text, then add the desired protection tag manually."); |
|
return; |
|
return; |
|
|
} |
|
} |
|
} |
|
} |
|
} |
Line 1,187: |
Line 1,298: |
|
function usprotect() |
|
function usprotect() |
|
{ |
|
{ |
|
|
var z = ''; |
|
//This is for if people skrew with the WP:PP page layout |
|
|
var movesec = 7; |
|
|
var artfull = 10; |
|
|
var artsemi = 11; |
|
|
var otherpro = 13; |
|
|
var userfull = 16; |
|
|
var usersemi = 17; |
|
|
var regtalk = 18; |
|
|
var anontalk = 19; |
|
|
//End of WP:PP constants |
|
|
var z =''; |
|
|
if (document.title.indexOf("Editing User talk") != -1) |
|
if (document.title.indexOf("Editing User talk") != -1) |
|
{ |
|
{ |
Line 1,207: |
Line 1,308: |
|
} |
|
} |
|
var reg = ''; |
|
var reg = ''; |
|
var target = document.editform.action; |
|
var target = document.title.split("Editing ").split(" - "); |
|
|
jstarget = URLEncoding(target); |
|
target = target.substring(target.indexOf('title=') + 6, target.lastIndexOf('&action=submit')); |
|
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
{ |
|
{ |
Line 1,270: |
Line 1,371: |
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{Vprotected}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{Vprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{Sutprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{sutprotected}}') != undefined) |
|
{ |
|
{ |
|
z = 'notag'; |
|
z = 'notag'; |
Line 1,308: |
Line 1,417: |
|
return; |
|
return; |
|
} |
|
} |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
document.editform.wpTextbox1.value = '{{sprotected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpTextbox1.value = '{{sprotected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpSummary.value = '+{{sprotected' + '}}'; |
|
document.editform.wpSummary.value += '+{{sprotected' + '}}'; |
|
window1 = window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + type + '&fakeaction=' + act + 'plist&faketarget=' + target, |
|
window1 = window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + type + '&fakeaction=' + act + 'plist&faketarget=' + jstarget, |
|
'targetname', |
|
'targetname', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
window2 = window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect', |
|
window2 = window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jssprotect', |
|
|
'targetname2', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
function ufprotect() |
|
|
{ |
|
|
var z = ''; |
|
|
if (document.title.indexOf("Editing User:") != -1) |
|
|
{ |
|
|
value = 'u'; |
|
|
} |
|
|
var reg = ''; |
|
|
var target = document.title.split("Editing ").split(" - "); |
|
|
jstarget = URLEncoding(target); |
|
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{Sprotect}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{sprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{Sprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{protect}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{protected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{moveprotect}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{moveprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{Usertalk-sprotect}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{usertalk-sprotect}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{vutprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{Vutprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{vprotect}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{vprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{Vprotect}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{Vprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{Sutprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{sutprotected}}') != undefined) |
|
|
{ |
|
|
z = 'notag'; |
|
|
} |
|
|
if (z == 'notag') |
|
|
{ |
|
|
alert("Error: A protection tag is already on this page. If this tag is supposed to be part of the text, then add the desired protection tag manually."); |
|
|
return; |
|
|
} |
|
|
else |
|
|
{ |
|
|
if (value == 'u') |
|
|
{ |
|
|
var act = 'u'; |
|
|
type = 16; |
|
|
} |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
|
document.editform.wpTextbox1.value = '{{Vprotected' + '}}\n' + document.editform.wpTextbox1.value; |
|
|
document.editform.wpSummary.value += '+{{Vprotected' + '}}'; |
|
|
window1 = window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + type + '&fakeaction=' + act + 'plist&faketarget=' + jstarget, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
window2 = window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jsfprotect', |
|
'targetname2', |
|
'targetname2', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
Line 1,322: |
Line 1,551: |
|
function oprotect() |
|
function oprotect() |
|
{ |
|
{ |
|
|
var z = ''; |
|
//This is for if people skrew with the WP:PP page layout |
|
|
|
var target = document.title.split("Editing ").split(" - "); |
|
var movesec = 7; |
|
|
|
jstarget = URLEncoding(target); |
|
var artfull = 10; |
|
|
var artsemi = 11; |
|
|
var otherpro = 13; |
|
|
var userfull = 16; |
|
|
var usersemi = 17; |
|
|
var regtalk = 18; |
|
|
var anontalk = 19; |
|
|
//End of WP:PP constants |
|
|
var z =''; |
|
|
var target = document.editform.action; |
|
|
target = target.substring(target.indexOf('title=') + 6, target.lastIndexOf('&action=submit')); |
|
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
{ |
|
{ |
Line 1,362: |
Line 1,581: |
|
else |
|
else |
|
{ |
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
document.editform.wpTextbox1.value = '{{protected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpTextbox1.value = '{{protected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpSummary.value = '+{{protected' + '}}'; |
|
document.editform.wpSummary.value += '+{{protected' + '}}'; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=oplist&faketarget=' + target, |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=oplist&faketarget=' + jstarget, |
|
'targetname', |
|
'targetname', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect', |
|
window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jsfprotect', |
|
'targetname2', |
|
'targetname2', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
Line 1,375: |
Line 1,601: |
|
function osprotect() |
|
function osprotect() |
|
{ |
|
{ |
|
//This is for if people skrew with the WP:PP page layout |
|
|
var movesec = 7; |
|
|
var artfull = 10; |
|
|
var artsemi = 11; |
|
|
var otherpro = 13; |
|
|
var userfull = 16; |
|
|
var usersemi = 17; |
|
|
var regtalk = 18; |
|
|
var anontalk = 19; |
|
|
//End of WP:PP constants |
|
|
var z =''; |
|
var z =''; |
|
var target = document.editform.action; |
|
var target = document.title.split("Editing ").split(" - "); |
|
|
jstarget = URLEncoding(target); |
|
target = target.substring(target.indexOf('title=') + 6, target.lastIndexOf('&action=submit')); |
|
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
{ |
|
{ |
Line 1,426: |
Line 1,642: |
|
else |
|
else |
|
{ |
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
document.editform.wpTextbox1.value = '{{sprotected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpTextbox1.value = '{{sprotected' + '}}\n' + document.editform.wpTextbox1.value; |
|
document.editform.wpSummary.value = '+{{sprotected' + '}}'; |
|
document.editform.wpSummary.value += '+{{sprotected' + '}}'; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=oplist&faketarget=' + target, |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=oplist&faketarget=' + target, |
|
'targetname', |
|
'targetname', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect', |
|
window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jssprotect', |
|
'targetnameo', |
|
'targetnameo', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
Line 1,439: |
Line 1,662: |
|
function unprotect() |
|
function unprotect() |
|
{ |
|
{ |
|
|
var message = "Are you sure you want to unprotect this page?"; |
|
//This is for if people skrew with the WP:PP page layout |
|
|
var movesec = 7; |
|
var return_value = confirm(message); |
|
|
if (return_value == true) |
|
var artfull = 10; |
|
|
|
{ |
|
var artsemi = 11; |
|
|
var otherpro = 13; |
|
|
var userfull = 16; |
|
|
var usersemi = 17; |
|
|
var regtalk = 18; |
|
|
var anontalk = 19; |
|
|
//End of WP:PP constants |
|
|
var undefined; |
|
var undefined; |
|
var original = document.editform.wpTextbox1.value; |
|
var original = document.editform.wpTextbox1.value; |
|
var target = document.editform.action; |
|
var target = document.title.split("Editing ").split(" - "); |
|
|
jstarget = URLEncoding(target); |
|
target = target.substring(target.indexOf('title=') + 6, target.lastIndexOf('&action=submit')); |
|
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'sprotect'; |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') == '') |
|
|
|
whattype = artsemi; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotect}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{sprotect}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{sprotect}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{sprotected}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{sprotected}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'sprotected'; |
|
if (document.editform.wpTextbox1.value.split('{{sprotected}}') == '') |
|
|
|
whattype = artsemi; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotected}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{sprotected}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{sprotected}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{semiprotect}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{semiprotect}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'semiprotect'; |
|
if (document.editform.wpTextbox1.value.split('{{semiprotect}}') == '') |
|
|
|
whattype = artsemi; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{semiprotect}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{semiprotect}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{semiprotect}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{semiprotected}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{semiprotected}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'semiprotected'; |
|
if (document.editform.wpTextbox1.value.split('{{semiprotected}}') == '') |
|
|
|
whattype = artsemi; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{semiprotected}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
} |
|
|
else if (document.editform.wpTextbox1.value.split('{{semi-protected}}') != undefined) |
|
else |
|
|
{ |
|
{ |
|
|
whattag = 'semi-protected'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
whattype = artsemi; |
|
var before = document.editform.wpTextbox1.value.split('{{semiprotected}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{semiprotected}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artsemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{vprotect}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{vprotect}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'vprotect'; |
|
if (document.editform.wpTextbox1.value.split('{{vprotect}}') == '') |
|
|
|
whattype = artfull; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vprotect}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{vprotect}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{vprotect}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{vprotected}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{vprotected}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'vprotected'; |
|
if (document.editform.wpTextbox1.value.split('{{vprotected}}') == '') |
|
|
|
whattype = artfull; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vprotected}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{vprotected}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{vprotected}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{protect}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{protect}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'protect'; |
|
if (document.editform.wpTextbox1.value.split('{{protect}}') == '') |
|
|
|
whattype = artfull; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protect}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{protect}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{protect}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{protected}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{protected}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'protected'; |
|
if (document.editform.wpTextbox1.value.split('{{protected}}') == '') |
|
|
|
whattype = artfull; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protected}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{protected}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{protected}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + artfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{moveprotect}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{moveprotect}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'moveprotect'; |
|
if (document.editform.wpTextbox1.value.split('{{moveprotect}}') == '') |
|
|
|
whattype = movesec; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{moveprotect}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + movesec + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{moveprotect}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{moveprotect}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + movesec + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{moveprotected}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{moveprotected}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'moveprotected'; |
|
if (document.editform.wpTextbox1.value.split('{{moveprotected}}') == '') |
|
|
|
whattype = movesec; |
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{moveprotected}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + movesec + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
var go = 'yes'; |
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{moveprotected}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{moveprotected}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + movesec + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
|
} |
|
} |
|
else |
|
else |
|
{ |
|
{ |
|
alert("Error: Either there is no recognized protection tag on this page or the tag is preceded by text (in which case you have to remove it manually)."); |
|
alert("Error: There is no recognized protection tag on this page."); |
|
|
return; |
|
} |
|
} |
|
if (go == 'yes') |
|
if (go == 'yes') |
|
{ |
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect', |
|
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
|
document.editform.wpSummary.value += 'Unprotected page -- removing tag'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace('{{' + whattag + '}}',''); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + whattype + '&fakeaction=pdelist&faketarget=' + jstarget, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jsunprotect', |
|
'targetnamepro', |
|
'targetnamepro', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
jssubmitclose(); |
|
|
return; |
|
} |
|
} |
|
|
} |
|
} |
|
} |
|
|
|
|
|
function ounprotect() |
|
function ounprotect() |
|
{ |
|
{ |
|
//This is for if people skrew with the WP:PP page layout |
|
|
var movesec = 7; |
|
|
var artfull = 10; |
|
|
var artsemi = 11; |
|
|
var otherpro = 13; |
|
|
var userfull = 16; |
|
|
var usersemi = 17; |
|
|
var regtalk = 18; |
|
|
var anontalk = 19; |
|
|
//End of WP:PP constants |
|
|
var undefined; |
|
var undefined; |
|
var original = document.editform.wpTextbox1.value; |
|
var original = document.editform.wpTextbox1.value; |
|
var target = document.editform.action; |
|
var target = document.title.split("Editing ").split(" - "); |
|
|
jstarget = URLEncoding(target); |
|
target = target.substring(target.indexOf('title=') + 6, target.lastIndexOf('&action=submit')); |
|
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'sprotect'; |
|
if (document.editform.wpTextbox1.value.split('{{sprotect}}') == '') |
|
|
{ |
|
whattype = otherpro; |
|
|
var go = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotect}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{sprotect}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{sprotect}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{sprotected}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{sprotected}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'sprotected'; |
|
if (document.editform.wpTextbox1.value.split('{{sprotected}}') == '') |
|
|
{ |
|
whattype = otherpro; |
|
|
var go = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotected}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{sprotected}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{sprotected}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{protect}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{protect}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'protect'; |
|
if (document.editform.wpTextbox1.value.split('{{protect}}') == '') |
|
|
{ |
|
whattype = otherpro; |
|
|
var go = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protect}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{protect}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{protect}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{protected}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{protected}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'protected'; |
|
if (document.editform.wpTextbox1.value.split('{{protected}}') == '') |
|
|
{ |
|
whattype = otherpro; |
|
|
var go = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protected}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{protected}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{protected}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + otherpro + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{moveprotect}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{moveprotect}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'moveprotect'; |
|
if (document.editform.wpTextbox1.value.split('{{moveprotect}}') == '') |
|
|
{ |
|
whattype = movesec; |
|
|
var go = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{moveprotect}}'); |
|
|
var go = 'yes'; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + movesec + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetnamem', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{moveprotect}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{moveprotect}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + movesec + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetnamem', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
|
} |
|
} |
|
else if (document.editform.wpTextbox1.value.split('{{moveprotected}}') != undefined) |
|
else if (document.editform.wpTextbox1.value.split('{{moveprotected}}') != undefined) |
|
{ |
|
{ |
|
|
whattag = 'moveprotected'; |
|
if (document.editform.wpTextbox1.value.split('{{moveprotected}}') == '') |
|
|
{ |
|
whattype = movesec; |
|
|
var go = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{moveprotected}}'); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + movesec + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetnamem', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
else |
|
|
{ |
|
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
var before = document.editform.wpTextbox1.value.split('{{moveprotected}}'); |
|
|
var after = document.editform.wpTextbox1.value.split(before + '{{moveprotected}}'); |
|
|
document.editform.wpTextbox1.value = before + after; |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + movesec + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetnamem', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var go = 'yes'; |
|
|
} |
|
|
} |
|
} |
|
else |
|
else |
|
{ |
|
{ |
|
alert("Error: Either there is no recognized protection tag on this page or the tag is preceded by text (in which case you have to remove it manually)."); |
|
alert("Error: There is no recognized protection tag on this page."); |
|
} |
|
} |
|
if (go == 'no') |
|
if (go == 'no') |
Line 1,856: |
Line 1,816: |
|
if (go == 'yes') |
|
if (go == 'yes') |
|
{ |
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect', |
|
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
|
document.editform.wpSummary.value += 'Unprotected page -- removing tag'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace('{{' + whattag + '}}',''); |
|
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + whattype + '&fakeaction=pdelist&faketarget=' + jstarget, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jsunprotect', |
|
'targetnamep', |
|
'targetnamep', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
Line 1,865: |
Line 1,837: |
|
function uunprotect() |
|
function uunprotect() |
|
{ |
|
{ |
|
//This is for if people skrew with the WP:PP page layout |
|
|
var movesec = 7; |
|
|
var artfull = 10; |
|
|
var artsemi = 11; |
|
|
var otherpro = 13; |
|
|
var userfull = 16; |
|
|
var usersemi = 17; |
|
|
var regtalk = 18; |
|
|
var anontalk = 19; |
|
|
//End of WP:PP constants |
|
|
var undefined; |
|
var undefined; |
|
|
var gotagged = 'no'; |
|
|
var gonotagged = 'no'; |
|
if (document.title.indexOf("Editing User talk:") != -1) |
|
if (document.title.indexOf("Editing User talk:") != -1) |
|
{ |
|
{ |
Line 1,885: |
Line 1,849: |
|
} |
|
} |
|
var original = document.editform.wpTextbox1.value; |
|
var original = document.editform.wpTextbox1.value; |
|
var target = document.editform.action; |
|
var target = document.title.split("Editing ").split(" - "); |
|
|
jstarget = URLEncoding(target); |
|
target = target.substring(target.indexOf('title=') + 6, target.lastIndexOf('&action=submit')); |
|
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
Line 1,920: |
Line 1,884: |
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'sprotect'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotect}}'); |
|
|
|
type = usersemi; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + usersemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (value == 't') |
|
else if (value == 't') |
Line 1,930: |
Line 1,892: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'sprotect'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotect}}'); |
|
|
|
type = anontalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'sprotect'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotect}}'); |
|
|
|
type = regtalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
} |
Line 1,953: |
Line 1,911: |
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'vprotect'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vprotect}}'); |
|
|
|
type = userfull; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + userfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (value == 't') |
|
else if (value == 't') |
Line 1,963: |
Line 1,919: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'vprotect'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vprotect}}'); |
|
|
|
type = anontalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'vprotect'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vprotect}}'); |
|
|
|
type = regtalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
} |
Line 1,986: |
Line 1,938: |
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'vutprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vutprotected}}'); |
|
|
|
type = userfull; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + userfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (value == 't') |
|
else if (value == 't') |
Line 1,996: |
Line 1,946: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'vutprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vutprotected}}'); |
|
|
|
type = anontalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'vutprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vutprotected}}'); |
|
|
|
type = regtalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
} |
Line 2,019: |
Line 1,965: |
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'vprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vprotected}}'); |
|
|
|
type = userfull; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + userfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (value == 't') |
|
else if (value == 't') |
Line 2,029: |
Line 1,973: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'vprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vprotected}}'); |
|
|
|
type = anontalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'vprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{vprotected}}'); |
|
|
|
type = regtalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
} |
Line 2,052: |
Line 1,992: |
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'sprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotected}}'); |
|
|
|
type = usersemi; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + usersemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (value == 't') |
|
else if (value == 't') |
Line 2,062: |
Line 2,000: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'sprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotected}}'); |
|
|
|
type = anontalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'sprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{sprotected}}'); |
|
|
|
type = regtalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
} |
Line 2,085: |
Line 2,019: |
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{Usertalk-sprotect}}'); |
|
tagtype = 'Usertalk-sprotect'; |
|
|
type = usersemi; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + usersemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (value == 't') |
|
else if (value == 't') |
Line 2,095: |
Line 2,027: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{Usertalk-sprotect}}'); |
|
tagtype = 'Usertalk-sprotect'; |
|
|
type = anontalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{Usertalk-sprotect}}'); |
|
tagtype = 'Usertalk-sprotect'; |
|
|
type = regtalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
} |
Line 2,118: |
Line 2,046: |
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{usertalk-sprotect}}'); |
|
tagtype = 'usertalk-sprotect'; |
|
|
type = usersemi; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + usersemi + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (value == 't') |
|
else if (value == 't') |
Line 2,128: |
Line 2,054: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{usertalk-sprotect}}'); |
|
tagtype = 'usertalk-sprotect'; |
|
|
type = anontalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{usertalk-sprotect}}'); |
|
tagtype = 'usertalk-sprotect'; |
|
|
type = regtalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
} |
Line 2,151: |
Line 2,073: |
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'protect'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protect}}'); |
|
|
|
type = userfull; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + userfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (value == 't') |
|
else if (value == 't') |
Line 2,161: |
Line 2,081: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'protect'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protect}}'); |
|
|
|
type = anontalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'protect'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protect}}'); |
|
|
|
type = regtalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
} |
Line 2,184: |
Line 2,100: |
|
if (value == 'u') |
|
if (value == 'u') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'protected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protected}}'); |
|
|
|
type = userfull; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + userfull + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (value == 't') |
|
else if (value == 't') |
Line 2,194: |
Line 2,108: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'protected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protected}}'); |
|
|
|
type = anontalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
|
gotagged = 'yes'; |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
|
|
tagtype = 'protected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{protected}}'); |
|
|
|
type = regtalk; |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
} |
Line 2,215: |
Line 2,125: |
|
if (document.editform.wpTextbox1.value.split('{{moveprotect}}') == '') |
|
if (document.editform.wpTextbox1.value.split('{{moveprotect}}') == '') |
|
{ |
|
{ |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
document.editform.wpSummary.value += 'Unprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{moveprotect}}'); |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{moveprotect}}'); |
|
} |
|
} |
Line 2,223: |
Line 2,133: |
|
if (document.editform.wpTextbox1.value.split('{{moveprotected}}') == '') |
|
if (document.editform.wpTextbox1.value.split('{{moveprotected}}') == '') |
|
{ |
|
{ |
|
document.editform.wpSummary.value = 'Unprotected'; |
|
document.editform.wpSummary.value += 'Unprotected'; |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{moveprotected}}'); |
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.split('{{moveprotected}}'); |
|
} |
|
} |
Line 2,239: |
Line 2,149: |
|
if (reg == 'a') |
|
if (reg == 'a') |
|
{ |
|
{ |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + target, |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + anontalk + '&fakeaction=pdelist&faketarget=' + jstarget, |
|
'targetname', |
|
'targetname', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
gonotagged = 'yes'; |
|
} |
|
} |
|
else if (reg == 'r') |
|
else if (reg == 'r') |
|
{ |
|
{ |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + target, |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + regtalk + '&fakeaction=pdelist&faketarget=' + jstarget, |
|
'targetname', |
|
'targetname', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
gonotagged = 'yes'; |
|
} |
|
} |
|
else |
|
else |
|
{ |
|
{ |
|
alert("An unknown error has occured. Please contact User:Voice of All for help."); |
|
alert("An unknown error has occured."); |
|
} |
|
} |
|
} |
|
} |
Line 2,259: |
Line 2,171: |
|
if (level == 's') |
|
if (level == 's') |
|
{ |
|
{ |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + usersemi + '&fakeaction=pdelist&faketarget=' + target, |
|
window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + usersemi + '&fakeaction=pdelist&faketarget=' + jstarget, |
|
'targetname', |
|
'targetname', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
gonotagged = 'yes'; |
|
} |
|
} |
|
else if (level == 'f') |
|
else if (level == 'f') |
Line 2,268: |
Line 2,181: |
|
'targetname', |
|
'targetname', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
gonotagged = 'yes'; |
|
} |
|
} |
|
else |
|
else |
Line 2,277: |
Line 2,191: |
|
else if (value != 'u' && value != 't') |
|
else if (value != 'u' && value != 't') |
|
{ |
|
{ |
|
alert("An unknown page recognition error has occured. Please contact User:Voice of All for help."); |
|
alert("An unknown page recognition error has occured."); |
|
} |
|
} |
|
} |
|
} |
|
else |
|
else |
|
{ |
|
{ |
|
document.editform.wpSummary.value = ""; |
|
document.editform.wpSummary.value += ""; |
|
return; |
|
return; |
|
} |
|
} |
|
} |
|
} |
|
|
form = document.getElementById('bodyContent'); |
|
window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect', |
|
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
|
if (gotagged == 'yes') |
|
|
{ |
|
|
document.editform.wpSummary.value += 'Unprotected'; |
|
|
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace('{{' + tagtype + '}}',''); |
|
|
var windowpp = window.open('http://en.wikipedia.org/search/?title=Misplaced Pages:List_of_protected_pages&action=edit§ion=' + type + '&fakeaction=pdelist&faketarget=' + jstarget, |
|
|
'targetname', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
var windowcp = window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jsunprotect', |
|
'targetnameu', |
|
'targetnameu', |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
return; |
|
|
|
if (gonotagged == 'yes') |
|
|
{ |
|
|
var windowcp = window.open('http://en.wikipedia.org/search/?title=' + target + '&action=protect&fakeaction=jsunprotect', |
|
|
'targetnameu', |
|
|
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); |
|
|
} |
|
} |
|
} |
|
|
|
|
|
|
//Listing function |
|
addOnloadHook(autoplist); |
|
addOnloadHook(autoplist); |
|
|
|
|
function autoplist() |
|
function autoplist() |
|
{ |
|
{ |
Line 2,315: |
Line 2,249: |
|
if (action == 'plist') |
|
if (action == 'plist') |
|
{ |
|
{ |
|
|
autoreplacetxt('\n\n','\n'); |
|
var pagename = strip_namespace(target); |
|
|
|
var pagename = strip_namespace(target); |
|
|
pagename = unescape(pagename); |
|
|
var original = document.editform.wpTextbox1.value; |
|
|
document.editform.wpTextbox1.value = pagename; |
|
|
var username = document.editform.wpTextbox1.value.split("User:"); |
|
|
var usertalk = document.editform.wpTextbox1.value.split("User talk:"); |
|
|
var themovename = document.editform.wpTextbox1.value.split("Misplaced Pages:"); |
|
|
var themove = "*{{Non-article|Misplaced Pages|" + themovename + "}}"; |
|
|
var thepage = "*{{article|" + target + "}}"; |
|
|
var thepage2 = "* {{article|" + target + "}}"; |
|
|
var lapage = "*{{la|" + target + "}}"; |
|
|
var theuser = "*]"; |
|
|
var vandaltalk = "*{{vandal|" + usertalk + "}}"; |
|
|
document.editform.wpTextbox1.value = original; |
|
|
if (document.editform.wpTextbox1.value.split(theuser) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(vandaltalk) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(themove) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(thepage) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(thepage2) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(lapage) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
if (errorl == 'yes') |
|
|
{ |
|
|
alert("Error: The page is already listed."); |
|
|
return; |
|
|
} |
|
|
else |
|
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
var reason = prompt("Enter an explanation for protection:") |
|
var reason = prompt("Enter an explanation for protection:") |
|
var f = document.editform, t = f.wpTextbox1; |
|
var f = document.editform, t = f.wpTextbox1; |
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +="*{{article|" + pagename + "}}. " + reason + ". " + "~" + "~" + "~" + "~"; |
|
t.value +="*{{article|" + pagename + "}}. " + reason + ". " + "~" + "~" + "~" + "~"; |
|
f.wpSummary.value = "] protected "; |
|
f.wpSummary.value += "] protected; adding to list."; |
|
|
} |
|
} |
|
} |
|
|
if (action == 'uplist') |
|
} |
|
|
} |
|
|
|
|
|
addOnloadHook(autouplist); |
|
|
|
|
|
function autouplist() |
|
|
{ |
|
|
if (document.title.indexOf('Editing ') == 0) |
|
|
{ |
|
|
var action = ''; |
|
|
var target = ''; |
|
|
if (location.search) |
|
|
{ |
|
{ |
|
var l = location.search.substring(1).split('&'); |
|
autoreplacetxt('\n\n','\n'); |
|
for (var i = 0; i < l.length; ++i) |
|
var username = target.split("User:"); |
|
|
var pagename = strip_namespace(target); |
|
|
pagename = unescape(pagename); |
|
|
var original = document.editform.wpTextbox1.value; |
|
|
document.editform.wpTextbox1.value = pagename; |
|
|
var username = document.editform.wpTextbox1.value.split("User:"); |
|
|
var usertalk = document.editform.wpTextbox1.value.split("User talk:"); |
|
|
var themovename = document.editform.wpTextbox1.value.split("Misplaced Pages:"); |
|
|
var themove = "*{{Non-article|Misplaced Pages|" + themovename + "}}"; |
|
|
var thepage = "*{{article|" + target + "}}"; |
|
|
var thepage2 = "* {{article|" + target + "}}"; |
|
|
var lapage = "*{{la|" + target + "}}"; |
|
|
var theuser = "*]"; |
|
|
var vandaltalk = "*{{vandal|" + usertalk + "}}"; |
|
|
document.editform.wpTextbox1.value = original; |
|
|
if (document.editform.wpTextbox1.value.split(theuser) != undefined) |
|
{ |
|
{ |
|
var eq = l.indexOf('='); |
|
var errorl = 'yes'; |
|
var name = l.substring(0, eq); |
|
|
if (name == 'fakeaction') |
|
|
action = l.substring(eq + 1); |
|
|
else if (name == 'faketarget') |
|
|
target = unescape(l.substring(eq + 1)).replace(/_/g, ' '); |
|
|
} |
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(vandaltalk) != undefined) |
|
} |
|
|
if (action == 'uplist') |
|
{ |
|
{ |
|
var errorl = 'yes'; |
|
|
} |
|
var username = target.split("User:"); |
|
|
|
else if (document.editform.wpTextbox1.value.split(themove) != undefined) |
|
var pagename = strip_namespace(username); |
|
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(thepage) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(thepage2) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(lapage) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
if (errorl == 'yes') |
|
|
{ |
|
|
alert("Error: The page is already listed."); |
|
|
return; |
|
|
} |
|
|
else |
|
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
var reason = prompt("Enter an explanation for protection:") |
|
var reason = prompt("Enter an explanation for protection:") |
|
var f = document.editform, t = f.wpTextbox1; |
|
var f = document.editform, t = f.wpTextbox1; |
|
|
t.value +="*] -- " + reason + ". " + "~" + "~" + "~" + "~"; |
|
if (t.value.length > 0) |
|
|
|
f.wpSummary.value += "]" + " protected; adding to list."; |
|
t.value += '\n'; |
|
|
|
} |
|
t.value +="*] --" + reason + ". " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value = "]" + " protected "; |
|
|
} |
|
} |
|
|
if (action == 'utplist') |
|
} |
|
|
} |
|
|
|
|
|
addOnloadHook(autoutplist); |
|
|
|
|
|
function autoutplist() |
|
|
{ |
|
|
if (document.title.indexOf('Editing ') == 0) |
|
|
{ |
|
|
var action = ''; |
|
|
var target = ''; |
|
|
if (location.search) |
|
|
{ |
|
{ |
|
var l = location.search.substring(1).split('&'); |
|
autoreplacetxt('\n\n','\n'); |
|
for (var i = 0; i < l.length; ++i) |
|
var username = target.split("User talk:"); |
|
|
var pagename = strip_namespace(target); |
|
|
pagename = unescape(pagename); |
|
|
var original = document.editform.wpTextbox1.value; |
|
|
document.editform.wpTextbox1.value = pagename; |
|
|
var username = document.editform.wpTextbox1.value.split("User:"); |
|
|
var usertalk = document.editform.wpTextbox1.value.split("User talk:"); |
|
|
var themovename = document.editform.wpTextbox1.value.split("Misplaced Pages:"); |
|
|
var themove = "*{{Non-article|Misplaced Pages|" + themovename + "}}"; |
|
|
var thepage = "*{{article|" + target + "}}"; |
|
|
var thepage2 = "* {{article|" + target + "}}"; |
|
|
var lapage = "*{{la|" + target + "}}"; |
|
|
var theuser = "*]"; |
|
|
var vandaltalk = "*{{vandal|" + usertalk + "}}"; |
|
|
document.editform.wpTextbox1.value = original; |
|
|
if (document.editform.wpTextbox1.value.split(theuser) != undefined) |
|
{ |
|
{ |
|
var eq = l.indexOf('='); |
|
var errorl = 'yes'; |
|
var name = l.substring(0, eq); |
|
|
if (name == 'fakeaction') |
|
|
action = l.substring(eq + 1); |
|
|
else if (name == 'faketarget') |
|
|
target = unescape(l.substring(eq + 1)).replace(/_/g, ' '); |
|
|
} |
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(vandaltalk) != undefined) |
|
} |
|
|
if (action == 'utplist') |
|
{ |
|
{ |
|
var errorl = 'yes'; |
|
|
} |
|
var username = target.split("User talk:"); |
|
|
|
else if (document.editform.wpTextbox1.value.split(themove) != undefined) |
|
var pagename = strip_namespace(username); |
|
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(thepage) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(thepage2) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(lapage) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
if (errorl == 'yes') |
|
|
{ |
|
|
alert("Error: The page is already listed."); |
|
|
return; |
|
|
} |
|
|
else |
|
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
var reason = prompt("Enter an explanation for protection:") |
|
var reason = prompt("Enter an explanation for protection:") |
|
var f = document.editform, t = f.wpTextbox1; |
|
var f = document.editform, t = f.wpTextbox1; |
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +="*{{vandal|" + pagename + "}} --" + reason + ". " + "~" + "~" + "~" + "~"; |
|
t.value +="*{{vandal|" + pagename + "}} --" + reason + ". " + "~" + "~" + "~" + "~"; |
|
f.wpSummary.value = "]" + " protected "; |
|
f.wpSummary.value += "]" + " protected; adding to list."; |
|
|
} |
|
|
} |
|
|
if (action == 'oplist') |
|
|
{ |
|
|
autoreplacetxt('\n\n','\n'); |
|
|
var pagename = strip_namespace(target); |
|
|
pagename = unescape(pagename); |
|
|
var original = document.editform.wpTextbox1.value; |
|
|
document.editform.wpTextbox1.value = pagename; |
|
|
var username = document.editform.wpTextbox1.value.split("User:"); |
|
|
var usertalk = document.editform.wpTextbox1.value.split("User talk:"); |
|
|
var themovename = document.editform.wpTextbox1.value.split("Misplaced Pages:"); |
|
|
var themove = "*{{Non-article|Misplaced Pages|" + themovename + "}}"; |
|
|
var thepage = "*{{article|" + target + "}}"; |
|
|
var thepage2 = "* {{article|" + target + "}}"; |
|
|
var lapage = "*{{la|" + target + "}}"; |
|
|
var theuser = "*]"; |
|
|
var vandaltalk = "*{{vandal|" + usertalk + "}}"; |
|
|
document.editform.wpTextbox1.value = original; |
|
|
if (document.editform.wpTextbox1.value.split(theuser) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(vandaltalk) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(themove) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(thepage) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(thepage2) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(lapage) != undefined) |
|
|
{ |
|
|
var errorl = 'yes'; |
|
|
} |
|
|
if (errorl == 'yes') |
|
|
{ |
|
|
alert("Error: The page is already listed."); |
|
|
return; |
|
|
} |
|
|
else |
|
|
{ |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
|
var reason = prompt("Enter an explanation for protection") |
|
|
var f = document.editform, t = f.wpTextbox1; |
|
|
t.value +="*{{Non-article|Misplaced Pages|" + pagename + "}}. " + reason + ". " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value += "]" + " protected; adding to list."; |
|
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
|
|
|
//This function sets the selected values on the Confirm protection page |
|
addOnloadHook(autooplist); |
|
|
|
addOnloadHook(jsprotect); |
|
|
|
|
function autooplist() |
|
function jsprotect() |
|
{ |
|
{ |
|
if (document.title.indexOf('Editing ') == 0) |
|
if (document.title.indexOf('Confirm protection') != -1) |
|
{ |
|
{ |
|
var action = ''; |
|
var action = ''; |
Line 2,416: |
Line 2,516: |
|
target = unescape(l.substring(eq + 1)).replace(/_/g, ' '); |
|
target = unescape(l.substring(eq + 1)).replace(/_/g, ' '); |
|
} |
|
} |
|
} |
|
} |
|
if (action == 'oplist') |
|
if (action == 'jsunprotect') |
|
{ |
|
{ |
|
|
document.getElementsByTagName('option').selected=true; |
|
var pagename = strip_namespace(target); |
|
|
|
document.getElementsByTagName('option').selected=false; |
|
var reason = prompt("Enter an explanation for protection") |
|
|
|
document.getElementsByTagName('option').selected=true; |
|
var f = document.editform, t = f.wpTextbox1; |
|
|
|
document.getElementsByTagName('option').selected=false; |
|
if (t.value.length > 0) |
|
|
|
document.getElementsByTagName('option').selected=false; |
|
t.value += '\n'; |
|
|
|
document.getElementsByTagName('option').selected=false; |
|
t.value +="*{{Non-article|Misplaced Pages|" + pagename + "}}. " + reason + ". " + "~" + "~" + "~" + "~"; |
|
|
|
document.getElementById('mwProtect-reason').value = 'Article locked for a while; hopefully, protection is no longer necessary.'; |
|
f.wpSummary.value = "]" + " protected "; |
|
|
} |
|
} |
|
|
if (action == 'jssprotect') |
|
|
{ |
|
|
document.getElementsByTagName('option').selected=false; |
|
|
document.getElementsByTagName('option').selected=true; |
|
|
document.getElementsByTagName('option').selected=false; |
|
|
document.getElementsByTagName('option').selected=false; |
|
|
document.getElementsByTagName('option').selected=true; |
|
|
document.getElementsByTagName('option').selected=false; |
|
|
document.getElementById('mwProtect-reason').value = 'Heavy vandalism from multiple sources.'; |
|
|
} |
|
|
if (action == 'jsfprotect') |
|
|
{ |
|
|
document.getElementsByTagName('option').selected=false; |
|
|
document.getElementsByTagName('option').selected=false; |
|
|
document.getElementsByTagName('option').selected=true; |
|
|
document.getElementsByTagName('option').selected=false; |
|
|
document.getElementsByTagName('option').selected=false; |
|
|
document.getElementsByTagName('option').selected=true; |
|
|
document.getElementById('mwProtect-reason').value = 'Users engaging in edit warring.'; |
|
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
//END |
|
|
|
|
|
addOnloadHook(autopdelist); |
|
addOnloadHook(autopdelist); |
|
|
|
|
function autopdelist() |
|
function autopdelist() |
|
{ |
|
{ |
Line 2,453: |
Line 2,573: |
|
if (action == 'pdelist') |
|
if (action == 'pdelist') |
|
{ |
|
{ |
|
|
oldautoreplacetxt('* {{','*{{'); |
|
|
autoreplacetxt('\n\n','\n'); |
|
var undefined; |
|
var undefined; |
|
var splitpoint = ''; |
|
|
var nada = ''; |
|
|
var pagename = strip_namespace(target); |
|
var pagename = strip_namespace(target); |
|
|
pagename = unescape(pagename); |
|
var original = document.editform.wpTextbox1.value; |
|
var original = document.editform.wpTextbox1.value; |
|
document.editform.wpTextbox1.value = pagename; |
|
document.editform.wpTextbox1.value = pagename; |
Line 2,464: |
Line 2,585: |
|
var themove = "*{{Non-article|Misplaced Pages|" + themovename + "}}"; |
|
var themove = "*{{Non-article|Misplaced Pages|" + themovename + "}}"; |
|
var thepage = "*{{article|" + target + "}}"; |
|
var thepage = "*{{article|" + target + "}}"; |
|
var thepage2 = "* {{article|" + target + "}}"; |
|
var thepage2 = "* {{article|" + target.substr(0,1).toLowerCase + target.substring(1) + "}}"; |
|
var lapage = "*{{la|" + target + "}}"; |
|
var lapage = "*{{la|" + target + "}}"; |
|
var theuser = "*]"; |
|
var theuser = "*]"; |
|
var vandaltalk = "*{{vandal|" + usertalk + "}}"; |
|
var vandaltalk = "*{{vandal|" + usertalk + "}}"; |
|
document.editform.wpTextbox1.value = original; |
|
document.editform.wpTextbox1.value = original; |
|
|
form = document.getElementById('bodyContent'); |
|
|
l = form.getElementsByTagName('input'); |
|
|
for (i = 0 ; i < l.length; i++) |
|
|
{ |
|
|
if (l.name == 'wpMinoredit') |
|
|
{l.value = '1'; l.checked=true;} |
|
|
} |
|
if (document.editform.wpTextbox1.value.split(thepage) != undefined) |
|
if (document.editform.wpTextbox1.value.split(thepage) != undefined) |
|
{ |
|
{ |
Line 2,481: |
Line 2,609: |
|
secondhalf = original.split(thepage); |
|
secondhalf = original.split(thepage); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
} |
|
} |
|
else |
|
else |
|
{ |
|
{ |
|
if (splitpoint.split("* " + "{{") != undefined) |
|
|
{ |
|
|
splitpointb = splitpoint.split("* " + "{{"); |
|
|
secondhalf = document.editform.wpTextbox1.value.split(thepage + splitpointb); |
|
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpointb + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
|
return; |
|
|
} |
|
|
else |
|
|
{ |
|
|
secondhalf = document.editform.wpTextbox1.value.split(thepage + splitpoint); |
|
secondhalf = document.editform.wpTextbox1.value.split(thepage + splitpoint); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
return; |
|
return; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(thepage2) != undefined) |
|
else if (document.editform.wpTextbox1.value.split(thepage2) != undefined) |
|
{ |
|
{ |
Line 2,518: |
Line 2,634: |
|
secondhalf = original.split(thepage2); |
|
secondhalf = original.split(thepage2); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
return; |
|
return; |
|
} |
|
} |
|
else |
|
else |
|
{ |
|
{ |
|
if (splitpoint.split("* " + "{{") != undefined) |
|
|
{ |
|
|
splitpointb = splitpoint.split("* " + "{{"); |
|
|
secondhalf = document.editform.wpTextbox1.value.split(thepage2 + splitpointb); |
|
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpointb + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
|
return; |
|
|
} |
|
|
else |
|
|
{ |
|
|
secondhalf = document.editform.wpTextbox1.value.split(thepage2 + splitpoint); |
|
secondhalf = document.editform.wpTextbox1.value.split(thepage2 + splitpoint); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
return; |
|
return; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
else if (document.editform.wpTextbox1.value.split(themove) != undefined) |
|
else if (document.editform.wpTextbox1.value.split(themove) != undefined) |
|
{ |
|
{ |
Line 2,556: |
Line 2,660: |
|
secondhalf = original.split(themove); |
|
secondhalf = original.split(themove); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
} |
|
} |
Line 2,566: |
Line 2,670: |
|
secondhalf = document.editform.wpTextbox1.value.split(themove + splitpointb); |
|
secondhalf = document.editform.wpTextbox1.value.split(themove + splitpointb); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpointb + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpointb + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
return; |
|
return; |
Line 2,574: |
Line 2,678: |
|
secondhalf = document.editform.wpTextbox1.value.split(themove + splitpoint); |
|
secondhalf = document.editform.wpTextbox1.value.split(themove + splitpoint); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
return; |
|
return; |
Line 2,593: |
Line 2,697: |
|
secondhalf = original.split(lapage); |
|
secondhalf = original.split(lapage); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
} |
|
} |
Line 2,603: |
Line 2,707: |
|
secondhalf = document.editform.wpTextbox1.value.split(lapage + splitpointb); |
|
secondhalf = document.editform.wpTextbox1.value.split(lapage + splitpointb); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpointb + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpointb + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
return; |
|
return; |
Line 2,611: |
Line 2,715: |
|
secondhalf = document.editform.wpTextbox1.value.split(lapage + splitpoint); |
|
secondhalf = document.editform.wpTextbox1.value.split(lapage + splitpoint); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
return; |
|
return; |
Line 2,632: |
Line 2,736: |
|
secondhalf = document.editform.wpTextbox1.value.split(vandaltalk); |
|
secondhalf = document.editform.wpTextbox1.value.split(vandaltalk); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
alert("The page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
return; |
|
return; |
Line 2,639: |
Line 2,743: |
|
{ |
|
{ |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
return; |
|
return; |
Line 2,659: |
Line 2,763: |
|
secondhalf = document.editform.wpTextbox1.value.split(theuser + splitpoint); |
|
secondhalf = document.editform.wpTextbox1.value.split(theuser + splitpoint); |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert("The user's page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
alert("The user's page has been located and de-listed. The de-listed page had no protection summary or explanation."); |
|
return; |
|
return; |
Line 2,666: |
Line 2,770: |
|
{ |
|
{ |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpTextbox1.value = firsthalf + secondhalf; |
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
alert('The page has been located and de-listed. The protection explanation:' + '\n' + '------------' + '\n' + splitpoint + '\n' + '------------' + '\n' + '...was also removed. Please read this summary; avoid clicking "save page" if necessary.'); |
|
return; |
|
return; |
Line 2,674: |
Line 2,778: |
|
else |
|
else |
|
{ |
|
{ |
|
alert("Note: The page you unprotected was not found on the list and may never have been listed. However, check to make sure that this is not a glitch, such as the listed article being a redirect to the actual page or beind the newest entry, or inconsistant asterik usage. Move-protected articles tend to be listed inconsistantly. Also, some entries for non-articles are listed with templates that this tool does not look for."); |
|
alert("Note: The page you unprotected was not found on the list and may never have been listed. However, check to make sure that this is not a glitch, such as the listed article being a redirect to the actual page or beind the newest entry, or inconsistant asterik usage. Move-protected articles tend to be listed inconsistantly. Also, some entries for non-articles are listed with templates that this tool does not look for." + "\n" + "------------" + "\n" + "Debuging Information: " + "vandaltalk=" + vandaltalk + " |username=" + username + " |username2=" + usertalk + " |target=" + target + " |thepage=" + thepage + " |thepage2=" + thepage2 + " |themove=" + themove + " |theuser=" + theuser); |
|
|
document.editform.wpSummary.value += "] unprotected; delisting."; |
|
alert("Debuging Information: " + "vandaltalk=" + vandaltalk + "|username=" + username + "|username2=" + usertalk + " |target=" + target + "|thepage=" + thepage + "|themove=" + themove + " |splitpoint=" + splitpoint); |
|
|
document.editform.wpSummary.value = "] unprotected; delisting."; |
|
|
return; |
|
return; |
|
document.editform.wpTextbox1.value = original; |
|
document.editform.wpTextbox1.value = original; |
Line 2,683: |
Line 2,786: |
|
} |
|
} |
|
} |
|
} |
|
|
//END |
|
|
//RFPP tabs |
|
|
|
|
|
|
function rfppp() |
|
//</nowiki> |
|
|
|
{ |
|
|
var f = document.editform, t = f.wpTextbox1; |
|
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +=":'''Fully protected''' due to ]. " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value += "Response: page fully protected"; |
|
|
} |
|
|
|
|
|
|
function rfpps() |
|
//</nowiki> |
|
|
|
{ |
|
|
var f = document.editform, t = f.wpTextbox1; |
|
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +=":'''Semi-protected''' due to heavy ]. " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value += "Response: page semi-protected"; |
|
|
} |
|
|
|
|
|
function rfppm() |
|
|
{ |
|
|
var f = document.editform, t = f.wpTextbox1; |
|
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +=":'''Move-protected''' due to excessive renaming. " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value += "Response: page move-protected"; |
|
|
} |
|
|
|
|
|
function rfppun() |
|
|
{ |
|
|
var f = document.editform, t = f.wpTextbox1; |
|
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +=":'''Un-protected.''' Its been protected for long enough. Hopefully things have calmed down since then. " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value += "Response: page un-protected"; |
|
|
} |
|
|
|
|
|
function rfppu() |
|
|
{ |
|
|
var pro = prompt("A user already protected or un-protected (enter *p* or *u*)?") |
|
|
if (pro == 'p') { |
|
|
value = 'protected'; |
|
|
} |
|
|
else if (pro == 'u') { |
|
|
value = 'un-protected'; |
|
|
} |
|
|
else { |
|
|
alert("Error: Invalid input. Make sure that you are not actually including the aterisk symbols."); |
|
|
return; |
|
|
} |
|
|
var user = prompt("What user?") |
|
|
if (!user){return;} |
|
|
usera = user.replace(' ','_').replace(' ','_').replace(' ','_'); |
|
|
var f = document.editform, t = f.wpTextbox1; |
|
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +=":Page already " + value + " by ]" + ". " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value += "Response: already " + value + " by another user"; |
|
|
} |
|
|
|
|
|
function rfppru() |
|
|
{ |
|
|
var f = document.editform, t = f.wpTextbox1; |
|
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +=":The issues that started the ] have not yet been resolved and the edits also appear to be in ]. It is also too soon to assume that the editors have just left for good, so the page is better left protected for now. " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value += "Response: un-protection request denied"; |
|
|
} |
|
|
|
|
|
function rfppr() |
|
|
{ |
|
|
var f = document.editform, t = f.wpTextbox1; |
|
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +=":There is not enough recent activity to ] ] at this time. For now, be sure to use descriptive ] and discuss edits on ]. " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value += "Response: protection request denied"; |
|
|
} |
|
|
|
|
|
function rfpprv() |
|
|
{ |
|
|
var f = document.editform, t = f.wpTextbox1; |
|
|
if (t.value.length > 0) |
|
|
t.value += '\n'; |
|
|
t.value +=":There is not enough recent activity to ] ] at this time. Just ] and revert any vandalism. " + "~" + "~" + "~" + "~"; |
|
|
f.wpSummary.value += "Response: protection request denied"; |
|
|
} |
|
|
//</nowiki></pre> |