User:Hu12/monobook.js

From Wikipedia, the free encyclopedia

If a message on your talk page led you here, please be wary of who left it. The code below could contain malicious content capable of compromising your account; if your account appears to be compromised, it will be blocked. If you are unsure whether the code is safe, you can ask at the appropriate village pump.
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.
/* <pre><nowiki> */
 
// [[User:Lupin/popups.js]] - please include this line 
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'  
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
popupAdminLinks=true;
 
//</nowiki>[[Category:Wikipedia administrators who use VoA script|{{PAGENAME}}]]
// Call function to load when needed.
if (window.addEventListener) window.addEventListener("load",myLoadFuncs,false);
else if (window.attachEvent) window.attachEvent("onload",myLoadFuncs);
else
{
    window.previousLoadFunction = window.onload;
    window.onload = function()
    {
        window.previousLoadFunction();
        myLoadFuncs();
    }
}
 
// Load custom functions.
function myLoadFuncs()
{
// Add more toolbox links
 addToolBoxLinks();
// Add navbar links
 addNavBarLinks();
// Load custom tabs
 add_tabs();
}
 
// Add more personal links to the tollbox section.
function addToolBoxLinks()
{
    var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
    addlilink(tb, '/wiki/Wikipedia:Template messages/User_talk_namespace', 'Talk templates', '');
    addlilink(tb, '/wiki/Wikipedia:Template_messages', 'Templates', '');
    addlilink(tb, '/wiki/WP:CSD', 'SD criteria', '');
    addlilink(tb, '/wiki/Special:Log', 'Log', '');
    addlilink(tb, '/wiki/Special:Log/delete', 'Delete log', '');
    addlilink(tb, '/wiki/Special:Log/block', 'Block log', '');
    addlilink(tb, '/wiki/Special:Ipblocklist', 'IPBlocklist', '');
    addlilink(tb, '/wiki/Category:Requests for unblock', 'Unblock requests', '');
    addlilink(tb, '/wiki/Category:Wikipedia spam cleanup', 'Spam cleanup', '');
    addlilink(tb, 'http://tools.wikimedia.de/~erwin85/contribs.php', 'MultiUsr contrbs', '');
    addlilink(tb, 'http://wikipedia.ramselehof.de/wikiblame.php', 'Wikiblame', '');
    addlilink(tb, 'http://wikiscanner.virgil.gr/', 'wikiscanner', '');
    addlilink(tb, 'http://tools.wikimedia.de/~eagle/linksearch?search=&totalwikis=57', 'X-wiki link Srch', '');
    addlilink(tb, 'http://tools.wikimedia.de/~eagle/spamArchiveSearch.php', 'Anti Spam search', '');
}
 
function addNavBarLinks()
{   
    var navbar = document.getElementById('p-navigation').getElementsByTagName('ul')[0];
    var afdtime = new Date();
    var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
    addlilink(navbar, '/wiki/Wikipedia:Articles_for_deletion/Log/' + afdtime.getUTCFullYear()
        + '_' + months[afdtime.getUTCMonth()] + '_' + afdtime.getUTCDate(), 'Todays AfD', '');
    afdtime.setUTCDate(afdtime.getUTCDate() - 5);
    addlilink(navbar, '/wiki/Wikipedia:Articles_for_deletion/Log/' + afdtime.getUTCFullYear()
        + '_' + months[afdtime.getUTCMonth()] + '_' + afdtime.getUTCDate(), '5-day old AfD', '');
    var username=document.getElementById("pt-userpage").textContent;
    addlilink(navbar, '/wiki/User:COIBot/Poke', 'COIBot/Poke', '');
    addlilink(navbar, '/wiki/MediaWiki_talk:Spam-blacklist', 'Spam-blacklist', '');
    addlilink(navbar, '/wiki/Wikipedia_talk:WikiProject_Spam', 'WikiProject Spam', '');
    addlilink(navbar, '/w/index.php?title=Special%3ALinksearch&target=*.', 'Link Search', '');
}
// adds various tabs and menu tabs
function add_tabs()
{
  var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    // Only add for pages with "Editing User talk:" somewhere in the title
  if (document.title.indexOf("Editing User talk:") != -1)
     {
      addlimenu(tabs, 'Talk messages', 'talkm');
      var talkm = document.getElementById('talkm').getElementsByTagName('ul')[0];
      addlilink(talkm,'javascript:add_date("==" + "{{subst:CURRENTMONTHNAME}} {{subst:CURRENTDAY}}\, {{subst:CURRENTYEAR}}" + "==", 1)','Add Date', '');
      addlilink(talkm,'javascript:testn(1)', 'Test1', '');
      addlilink(talkm,'javascript:testn(2)','Test2', '');
      addlilink(talkm,'javascript:testn("2a")','Test2a', '');
      addlilink(talkm,'javascript:testn(3)','Test3', '');
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:Test4}} ~~~~", "Last warning", false, false, 1)','Test4', '');
      addlilink(talkm,'javascript:testn("4b")','Test4b', '');
      addlilink(talkm,'javascript:duration(1)', 'Temp Block', ''); 
      addlilink(talkm,'javascript:perm_name_block("{{s/block3|signature=~~~~}}", "You have been indefinitely blocked", true, false, 1)','Perm Block', ''); 
      addlilink(talkm,'javascript:perm_name_block("{{subst:nameblock}} ~~~~", "{{nameblock}}", true, false, 1)','Name Block', ''); 
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:bv}} ~~~~", "Vandalism", false, false, 1)','BV', '');
      addlilink(talkm,'javascript:vanity(1)', 'Vanity', '');
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:spam1}} ~~~~", "Adding links to Wikipedia", false, false, 1)','Spam1', '');
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:spam2}} ~~~~", "Spamming", false, false, 1)','Spam2', '');
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:spam3}} ~~~~", "Last warning for spamming", false, false, 1)','Spam3', '');
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:spam4}} ~~~~", "You have been blocked for spamming", false, false, 1)','Spam4', '');
      addlilink(talkm,'javascript:rvfd(1)', 'rvfd', ''); 
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:blanking}} ~~~~", "Blanking pages", false, false, 1)','blanking', '');
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:nothanks|}} ~~~~", "About your edits", false, false, 1)','nothanks', '');
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:nothanks-sd|pg=page name|url=url of source}} ~~~~", "{{nothanks-sd}}", false, false, 1)','nothanks-sd', '');
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:Welcome}} ~~~~", "Welcome to Wikipedia!", true, false, 1)','Welcome', '');
      addlilink(talkm,'javascript:edit_summary_watch("{{subst:Anon}}  ~~~~", "Welcome to Wikipedia!", true, false, 1)','Anon', '');
    }
}
//<nowiki> Helper tools
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//</nowiki>
//<nowiki> Admin rollback tools [[Category:Wikipedia administrators who use VoA script|{{PAGENAME}}]]
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Specialadmin/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//</nowiki>[[Category:Wikipedia administrators who use VoA script|{{PAGENAME}}]]
// Diff page links
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Revert/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//
//<nowiki> History tools
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/History/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
//</nowiki>[[Category:Wikipedians who use VoA script|{{PAGENAME}}]]
/**** End ****/
 
/* </nowiki></pre> */