User:Luna Santin/monobook.js
From Wikipedia, the free encyclopedia
If a message on your talk page led you here, please be wary of who left it. Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. If this is a .js page, the code will be executed when previewing the page.
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
// ======== QuickBlocks ======= function QuickBlock (expiry,reason,ao,autob,accfreeze) { 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'; } else if (ao==0) { inputs[i].checked = false; } continue; } if (inputs[i].name == 'wpEnableAutoblock') { if (autob==0) { inputs[i].checked=false; } continue; } if (inputs[i].name == 'wpCreateAccount') { if (accfreeze==0) { inputs[i].checked=false; } continue; } } blockForm.submit(); } addOnloadHook(function(){ if (document.title.indexOf("Block user") == -1) return; else { //TEMPLATE: addTab('javascript:('+QuickBlock+')("expiry","reason",ao,autob,accfreeze)','label','id'); addTab('javascript:('+QuickBlock+')("1 hour","Blocked for one hour, due to recent abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below.",1,1,1)','hour','p-block-ab-1h'); //Blocked for one hour, due to recent abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below. addTab('javascript:('+QuickBlock+')("24 hours","Blocked for 24 hours, due to recent abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below.",1,1,1)','24h','p-block-ab-24h'); //Blocked for 24 hours, due to recent abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below. addTab('javascript:('+QuickBlock+')("48 hours","Blocked for 48 hours, due to recent abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below.",1,1,1)','48h','p-block-ab-48h'); //Blocked for 48 hours, due to recent abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below. addTab('javascript:('+QuickBlock+')("1 week","Blocked for one week, due to repeat abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below.",1,1,1)','week','p-block-ab-1w'); //Blocked for one week, due to repeat abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below. addTab('javascript:('+QuickBlock+')("1 month","Blocked for one month, due to repeat abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below.",1,1,1)','month','p-block-ab-1m'); //Blocked for one month, due to repeat abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below. addTab('javascript:('+QuickBlock+')("indefinite","Blocked indefinitely, due to abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below.",1,1,1)','indef','p-block-ab-ind'); //Blocked indefinitely, due to abuse. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below. addTab('javascript:('+QuickBlock+')("6 months","{{anonblock}}",1,0,1)','anon-6m','p-block-anon-6m'); //{{anonblock}} addTab('javascript:('+QuickBlock+')("48 hours","This IP address has recently been used abusively. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below.",0,1,1)','48h-hard','p-block-ab-48-hard'); //This IP address has recently been used abusively. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below. addTab('javascript:('+QuickBlock+')("1 year","{{openproxy}}",0,1,1)','proxy','p-block-proxy'); //{{openproxy}} addTab('javascript:('+QuickBlock+')("indefinite","Similar to existing user or recent meme. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below.",1,1,1)','sock','p-block-sock-ind'); //Similar to existing user or recent meme. To appeal or request help, please [[Special:Emailuser/Luna Santin|contact me]], [[#Emailing us|unblock-en-l]], or follow the instructions below. addTab('javascript:('+QuickBlock+')("indefinite","{{usernameblocked}}",1,0,0)','name','p-block-username'); //{{Usernameblocked}} } }); //************ // CSD AutoReason importScript('User:^demon/csd.js'); //Some of VoA's stuff importScript('User:Voice_of_All/Addtabs/monobook.js'); importScript('User:Voice of All/Adminwarnings/monobook.js'); importScript('User:Voice_of_All/UTCclock.js'); importScript('User:Voice of All/History/monobook.js'); function changelinks() { if(!document.getElementById) return; var toplinks = document.getElementById('p-personal').getElementsByTagName('ul')[0]; var user_name = document.getElementById('pt-userpage').getElementsByTagName('a')[0].innerHTML; document.getElementById('pt-mytalk').firstChild.innerHTML = 'my Talk page'; document.getElementById('pt-preferences').firstChild.innerHTML = 'Change Preferences'; document.getElementById('pt-watchlist').firstChild.innerHTML = 'Check my Watchlist'; document.getElementById('pt-mycontris').firstChild.innerHTML = 'My Contributions'; document.getElementById('pt-logout').firstChild.innerHTML = 'Log out'; if(document.getElementById('ca-delete')) {document.getElementById('ca-delete').firstChild.innerHTML = '<strong><span style="color:darkred;">delete</span></strong>';} if(document.getElementById('ca-addsection')) {document.getElementById('ca-addsection').firstChild.innerHTML = '+';} } function navigationlinks() { addnavbox_link('/wiki/Wikipedia:Administrator_intervention_against_vandalism','Vandalism','aiv-ln'); addnavbox_link('/wiki/Category:Candidates_for_speedy_deletion','Speedy deletions','speedy-ln'); addnavbox_link('/wiki/Wikipedia:Requests for page protection','Protection requests','rfpp-ln'); addnavbox_link('/wiki/Wikipedia:Administrators%27_noticeboard','Noticeboard','AN-ln'); } function addtoolboxlinks() { var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0]; addlilink(tb, '/wiki/Special:Newpages', 'New pages', ''); addlilink(tb, '/wiki/Special:Log/newusers', 'New users', ''); } function userlogs() { //no subpages or history if (document.title.search("/") != -1 || location.href.search(/Special:|&action=[^p]|&diff=/) !=-1) {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/w/index.php?title=Special%3ALog&type=block&user=&page=User:" + username, "log", "ca-blog", "block log", ""); } } function block_check() { if (document.title.indexOf('Block user') !=0){return;} //monobook if (document.getElementById('pt-userpage')) {var user_name = document.getElementById('pt-userpage').getElementsByTagName('a')[0].innerHTML;} //cologneblue else if (document.getElementById('quickbar') && document.getElementById('quickbar').getElementsByTagName('h6')[0]) { var toplinks = document.getElementById('quickbar'); var user_name = toplinks.innerHTML.split('<h6>My pages</h6>')[1].split('title="User:')[1].split('"')[0]; } if (document.getElementsByTagName('input')[0].value == user_name) {alert('Are you sure you want to block yourself?');} else if (document.getElementsByTagName('input')[0].value == user_name.replace(/ /g,'_')) {alert('Are you sure you want to block yourself?');} } addOnloadHook(Mainfast) function Mainfast() { userlogs(); changelinks(); navigationlinks(); addtoolboxlinks(); block_check(); } //[[Category:VoA scripted admins]] //************ //Lupin's tools //************ //Filter changes live [[Category:VoA scripted admins]] //[[User:Lupin/recent2.js]] - please include this line document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //[[User:Lupin/popupsdev.js]] - please include this line document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popupsdev.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); popupShortcutKeys=true; // optional: enable keyboard shortcuts popupAdminLinks=true; // optional: enable admin links [[Category:VoA scripted admins]] popupSubpopups=false; popupOnEditSelection=false; popupStructure='shortmenus'; //END //************

