User:Voice of All/Protection/monobook.js: Difference between revisions

Content deleted Content added
rm tab and PP crap
Line 5:
function WP_PP_helper()
{
if (document.title.indexOf('Protected pages') !=0 ) return;
if (document.title.indexOf('/') !=-1) return;
if (___location.href.search(/&action=/) !=-1) return;
Line 143 ⟶ 142:
function protection_tabs()
{
if(document.getElementById('ca-protect'))
{document.getElementById('ca-protect').firstChild.innerHTML = '<span style="color:black;">protect</span>';}
if(document.getElementById('ca-unprotect'))
{document.getElementById('ca-unprotect').firstChild.innerHTML = '<strong>unprotect</strong>';}
var non_art = /Talk:| talk:|User:|MediaWiki:|Image:|Wikipedia:|Template:|Portal:|Help:|Main Page|Category:/;
if (document.title.indexOf("Editing ") != -1)
{
if(document.getElementById('ca-watch'))
{document.getElementById('ca-watch').firstChild.innerHTML = '[w]';}
if(document.getElementById('ca-unwatch'))
{document.getElementById('ca-unwatch').firstChild.innerHTML = '[uw]';}
if (document.title.search(non_art) != -1)
{document.getElementById('ca-talk').firstChild.innerHTML = 'Talk';}
if(document.getElementById('ca-protect'))
{document.getElementById('ca-protect').firstChild.innerHTML = '<span style="color:black;">P (off)</span>';}
if(document.getElementById('ca-unprotect'))
{document.getElementById('ca-unprotect').firstChild.innerHTML = '<strong>P (on)</strong>';}
if (document.title.indexOf("Editing User talk:") != -1)
{
Line 432 ⟶ 417:
document.editform.wpTextbox1.value = '{{sprotected' + '}}\n' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value += '+{{sprotected' + '}}';
 
window1 = window.open('http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_protected_pages&action=edit&section=' + type + '&jsaction=' + act + 'plist&jsaction=' + jstarget,
'WP:PP add',
'___location=no,toolbar=no,status=no,directories=no,scrollbars=yes,fullscreen=yes');
window2 = window.open('http://en.wikipedia.org/w/index.php?title=' + target.replace(/&/g,"%26") + '&action=protect&jsaction=sprotect',
'Page protect',
Line 492 ⟶ 475:
document.editform.wpTextbox1.value = '{{Vprotected' + '}}\n' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value += '+{{Vprotected' + '}}';
window1 = window.open('http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_protected_pages&action=edit&section=' + type + '&jsaction=' + act + 'plist&jsaction=' + jstarget,
'WP:PP add',
'___location=no,toolbar=no,status=no,directories=no,scrollbars=yes,fullscreen=yes');
window2 = window.open('http://en.wikipedia.org/w/index.php?title=' + target.replace(/&/g,"%26") + '&action=protect&jsaction=fprotect',
'Page protect',
Line 538 ⟶ 518:
document.editform.wpTextbox1.value = '{{protected' + '}}\n' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value += '+{{protected' + '}}';
window.open('http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_protected_pages&action=edit&section=' + otherpro + '&jsaction=oplist&jsaction=' + jstarget,
'WP:PP add',
'___location=no,toolbar=no,status=no,directories=no,scrollbars=yes,fullscreen=yes');
window.open('http://en.wikipedia.org/w/index.php?title=' + target.replace(/&/g,"%26") + '&action=protect&jsaction=fprotect',
'Page protect',
Line 582 ⟶ 559:
document.editform.wpTextbox1.value = '{{sprotected' + '}}\n' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value += '+{{sprotected' + '}}';
window.open('http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_protected_pages&action=edit&section=' + otherpro + '&jsaction=oplist&jsaction=' + target,
'targetname',
'___location=no,toolbar=no,status=no,directories=no,scrollbars=yes,fullscreen=yes');
window.open('http://en.wikipedia.org/w/index.php?title=' + target.replace(/&/g,"%26") + '&action=protect&jsaction=sprotect',
'targetnameo',
Line 1,037 ⟶ 1,011:
{
if (reg == 'a')
{
window.open('http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_protected_pages&action=edit&section=' + anontalk + '&jsaction=pdelist&jsaction=' + jstarget,
'WP:PP remove',
'___location=no,toolbar=no,status=no,directories=no,scrollbars=yes,fullscreen=yes');
gonotagged = 'yes';
}
else if (reg == 'r')
{
window.open('http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_protected_pages&action=edit&section=' + regtalk + '&jsaction=pdelist&jsaction=' + jstarget,
'Page unprotect',
'___location=no,toolbar=no,status=no,directories=no,scrollbars=yes,fullscreen=yes');
gonotagged = 'yes';
}
Line 1,059 ⟶ 1,027:
var level = prompt("Page no longer semi or fully protected (enter *s* or *f*)?");
if (level == 's')
{
window.open('http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_protected_pages&action=edit&section=' + usersemi + '&jsaction=pdelist&jsaction=' + jstarget,
'WP:PP remove',
'___location=no,toolbar=no,status=no,directories=no,scrollbars=yes,fullscreen=yes');
gonotagged = 'yes';
}
else if (level == 'f')
{
window.open('http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_protected_pages&action=edit&section=' + userfull + '&jsaction=pdelist&jsaction=' + target,
'Page unprotect',
'___location=no,toolbar=no,status=no,directories=no,scrollbars=yes,fullscreen=yes');
gonotagged = 'yes';
}
Line 1,101 ⟶ 1,063:
var whattag_upper = tagtype.substring(0,1).toUpperCase() + tagtype.substring(1,whattag.length);
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace('{{' + tagtype + '}}','');
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace('{{' + whattag_upper + '}}','');
var windowpp = window.open('http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_protected_pages&action=edit&section=' + type + '&jsaction=pdelist&jsaction=' + jstarget,
'WP:PP remove',
'___location=no,toolbar=no,status=no,directories=no,scrollbars=yes,fullscreen=yes');
var windowcp = window.open('http://en.wikipedia.org/w/index.php?title=' + target.replace(/&/g,"%26") + '&action=protect&jsaction=unprotect',
'Page unprotect',