User:Angela/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.

// this is so I can have a link in my sidebar that opens today's [[Wikipedia:Copyright problems]] subpage

months = new Array();
months[1] = "January";  months[7] = "July";
months[2] = "February"; months[8] = "August";
months[3] = "March";    months[9] = "September";
months[4] = "April";    months[10] = "October";
months[5] = "May";      months[11] = "November";
months[6] = "June";     months[12] = "December";

now = new Date();
date  = now.getDate();
month = now.getMonth() + 1;
yy = now.getYear();
year = (yy < 1000) ? yy + 1900 : yy;

today = year + " " + months[month] + " " + date;

function morelinks() {
  var tabs = document.getElementById('p-cactions').cloneNode(true);
  tabs.id = 'mytabs';
  var listitems = tabs.getElementsByTagName('LI');
  for (i=0;i<listitems.length;i++) {
    if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id;
  }
  document.getElementById('column-content').appendChild(tabs);
}
if (window.addEventListener) window.addEventListener("load",morelinks,false);
else if (window.attachEvent) window.attachEvent("onload",morelinks);

// this is somewhat broken. It's not the best way to add sidebar links and goes a bit weird when the interlanguage links overlap it, but if you want 20 extra links in the sidebar, you may find it useful

document.write('\<div id="sites">&nbsp;<small><font face="Arial Narrow"> <a href="http:\/\/meta.wikimedia.org\/wiki\/Special:Recentchanges">M<\/a> |  <a href="http:\/\/www.wikicities.com\/wiki\/Special:Recentchanges">WC<\/a> |  <a href="http:\/\/grants.wikimedia.org\/wiki\/Special:Recentchanges">Gra<\/a>  |  <a href="http:\/\/internal.wikimedia.org\/wiki\/Special:Recentchanges">Int<\/a>  |  <a href="https:\/\/pokemon.broadbandmechanics.com\/otrs\/index.pl\?Action\=AgentTicketQueue">Ourm<\/a>  |  <a href="https:\/\/ticket.wikimedia.org\/otrs\/index.pl\?Action\=AgentTicketQueue&QueueID\=10">OTRS<\/a> | <a href="http:\/\/wiki.mediawiki.org\/wiki\/Special:Recentchanges">MW<\/a> | <a href="http:\/\/wikimediafoundation.org\/wiki\/Special:Recentchanges">WMF<\/a><\/font><\/small><\/div>  <div id="smalllinks"><small> &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/wiki\/Wikipedia:Protected page">Protected<\/a>  <a href="http:\/\/en.wikipedia.org\/wiki\/Wikipedia:Requests for page protection">Reqs<\/a>  &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/wiki\/Special:Log\/protect">Log<\/a><br\/> &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/wiki\/Wikipedia:Vandalism in progress">Vandals<\/a>   &nbsp;&nbsp;<a href="http:\/\/www.google-watch.org\/cgi-bin\/nbbc.cgi">IP<\/a>  &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/wiki\/Special:Ipblocklist">List<\/a>  &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/wiki\/Special:Blockip">Block<\/a>  &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/wiki\/Special:Log\/block">Log<\/a><br\/> &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/wiki\/Wikipedia:Articles_for_deletion">AfD<\/a> &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/w\/index.php\?title\=Wikipedia:Miscellaneous_deletion\&action\=purge">Misc del<\/a> &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/w\/index.php\?title\=Wikipedia:Copyright_problems\/' + today + '\&action\=edit">Vio<\/a> &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/wiki\/Wikipedia:Cleanup">Cleanup<\/a> &nbsp;&nbsp;<a href="http:\/\/en.wikipedia.org\/wiki\/Special:Log\/delete">Log<\/a><br\/> &nbsp;&nbsp;<a href="\/wiki\/Wikipedia:Goings-on" title="Wikipedia:Goings-on">Goings-on<\/a>  &nbsp;&nbsp;<a href="\/w\/wiki.phtml?title=Wikipedia:Village_pump_(all)&action=purge" title="Wikipedia:Village pump">Pump<\/a>  &nbsp;&nbsp;<a href="\/wiki\/Wikipedia:Help_desk" title="Wikipedia:Help desk">Help desk<\/a><br \/> <\/small> <\/div>')

// [[User:Lupin/popups.js]] - See [[Wikipedia:Tools/Navigation popups]] for details

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;
popupShortcutKeys=true;
popupOnlyArticleLinks=false;
popupMaxWidth=600;
popupExtraUserMenu=true;


// Script from [[User:Lupin/sectionkeys.js]]
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/sectionkeys.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
// <pre><nowiki> 
var addOnloadFunction=function(f) {
  if (window.addEventListener) window.addEventListener("load",f,false);
  else if (window.attachEvent) window.attachEvent("onload",f);
  else {
    var oldOnload='_old_onload_'+addOnloadFunction.uid;
    addOnloadFunction[oldOnload] = window.onload ? window.onload : function () {};
    window.onload = function() { addOnloadFunction[oldOnload]();  f(); }
    ++addOnloadFunction.uid;
  }
}
addOnloadFunction.uid=0;

ta['pt-logout'] = new Array('','Log out'); /* hotkey was removed */

function wikiabuttons() {
    // instructions: http://en.wikipedia.org/w/index.php?title=User_talk:Splarka/wikialink.js
    addwb("action","wikia","www.wikia.com/wiki/","");
}

document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Splarka/wikialink.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// </nowiki></pre>