User:Winhunter/monobook.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.
//<nowiki> Admin tools document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/admin/monobook.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //</nowiki> [[Category:Wikipedia administrators who use VoA script|{{PAGENAME}}]] //<nowiki>Please leave the following line [[user:Where/usertabs]] addOnloadHook(function() { if (document.title.search("/") != -1 || document.title.search("- History -") != -1) { //no subpages or history return; } if (document.title.indexOf("User:") == 0 || document.title.indexOf("User talk:") == 0) { username_a = document.URL.match(/:.*:(.*)/); username=username_a[1]; addTab("http://en.wikipedia.org/wiki/Special:Contributions/" + username, "contrib", "ca-contrib", "contribs", ""); addTab("http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=move&user=" + username, "page moves", "ca-pagemoves", "page moves", ""); addTab("http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=&page=User:" + username, "block log", "ca-blog", "blog", ""); addTab("http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=enwiki_p&user=" + username, "edit count", "ca-kate", "kate", ""); } }); //</nowiki> //<nowiki> ======== QuickBlocks ======= function QuickBlock (expiry,reason,ao,autob) { blockForm = document.getElementById('blockip'); inputs = blockForm.getElementsByTagName('input'); for (i=0; i<inputs.length; i++) { if (inputs[i].name == 'wpBlockOther') { inputs[i].value = expiry; continue; } if (inputs[i].name == 'wpBlockReason') { inputs[i].value = reason; continue; } if (inputs[i].name == 'wpAnonOnly') { if (ao==1) { inputs[i].checked = 'checked'; } if (ao==0) { inputs[i].checked=false; } continue; } if (inputs[i].name == 'wpEnableAutoblock') { if (autob==1) { inputs[i].checked = 'checked'; } if (autob==0) { inputs[i].checked=false; } continue; } } blockForm.submit(); } addOnloadHook(function(){ if (document.title.indexOf("Block user") == -1) return; addTab('javascript:('+QuickBlock+')("indefinite","{{usernameblocked}} Please read our [[WP:U|our username policy]] and choose another name",0,0)','Username','p-block-user'); addTab('javascript:('+QuickBlock+')("indefinite","{{test5i}} vandal account",0,1)','Vandal acc','p-block-vandalism'); addTab('javascript:('+QuickBlock+')("indefinite","Similar to existing user or recent meme: please [[Special:Emailuser/Luna Santin|Email me]] if you are a legitimate editor.",0,1)','sockpuppet','p-block-sock'); addTab('javascript:('+QuickBlock+')("31 hours","{{test5}} Recent vandalism.",0,1)','31 hours','p-block-31h'); addTab('javascript:('+QuickBlock+')("1 week","{{test5}} Repeat vandalism.",0,1)','Week','p-block-school'); addTab('javascript:('+QuickBlock+')("1 month","{{test5}} Chronic vandalism.",0,1)','Month','31-days'); addTab('javascript:('+QuickBlock+')("31 hours","Trolling. If this is a shared address, please register an account to avoid collateral damage.",0,1)','Troll-31','p-block-troll-31'); addTab('javascript:('+QuickBlock+')("indefinite","Trolling",0,1)','Troll-indef','p-block-troll-indef'); }); //</nowiki>************