User:Minun/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.
// Script from [[User:MarkS/extraeditbuttons.js]]
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:MarkS/extraeditbuttons.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
var sig = '&mdash;[[User:Minun/PCP/Entrance|<font color="red">'''''M'''''</font>]][[User:Minun|<font color="#ffcc00;">''' ''inun'' '''</font>]] <sup>[[User talk:Minun|<font color="#ffcc00;">''' ''Spiderman'' '''</font>]]</sup> 18:47, 17 July 2006 (UTC)'
// <pre><nowiki>
 
topaz.statuschanger = new Object();
 
/* configuration */
// change these to whatever you'd like to show up on your status page.
topaz.statuschanger.statuscode = {
  online:'[[Image:In_Icon.JPG]]',
  busy:'[[Image:Around_Icon.JPG]]',
  offline:'[[Image:Out_Icon.JPG]]'
};
// true to use the personal bar, false to create a panel in the left column
topaz.statuschanger.usepersonalbar = true;
/* end configuration */
 
topaz.statuschanger.oldonload = window.onload;
window.onload = function() {
  if (typeof topaz.statuschanger.oldonload == "function") topaz.statuschanger.oldonload();
  if (topaz.statuschanger.usepersonalbar) {
    var a = topaz.wputil.addsidepanelbutton("p-personal", "Online",
        'javascript:topaz.statuschanger.setstatus("online")'
    );
    var b = topaz.wputil.addsidepanelbutton("p-personal", "Busy",
        'javascript:topaz.statuschanger.setstatus("busy")'
    );
    var c = topaz.wputil.addsidepanelbutton("p-personal", "Offline",
        'javascript:topaz.statuschanger.setstatus("offline")'
    );
    a.style.borderRight=b.style.borderRight="1px solid #aaaaaa";
    b.style.marginLeft=c.style.marginLeft="0px";
    a.style.paddingRight=b.style.paddingLeft=b.style.paddingRight=c.style.paddingLeft="2px";
  } else {
    topaz.wputil.addsidepanel("tz-statuschanger", "status changer");
    topaz.wputil.addsidepanelbutton("tz-statuschanger", "Online",
        'javascript:topaz.statuschanger.setstatus("online")'
    );
    topaz.wputil.addsidepanelbutton("tz-statuschanger", "Busy",
        'javascript:topaz.statuschanger.setstatus("busy")'
    );
    topaz.wputil.addsidepanelbutton("tz-statuschanger", "Offline",
        'javascript:topaz.statuschanger.setstatus("offline")'
    );
  }
};
 
topaz.statuschanger.setstatus = function(statusname) {
  topaz.wputil.setpagecontent(
      "User:"+topaz.wputil.username()+"/Status",
      topaz.statuschanger.statuscode[statusname],
      statusname);
};
 
//</nowiki></pre>
//Create 'winc' function:
 
function winc(s) {
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=' + s
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
}
 
 
//function to handle dates:
 
winc('User:Bobblewik/monobook.js/dates.js');
 
 
//function to handle units:
 
winc('User:Bobblewik/monobook.js/unitformatter.js');
// Script from [[User:Lupin/recent2.js]]
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/popups.js]]
 
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>');
var mpTitle = "Main Page";
var isMainPage = (document.title.substr(0, document.title.lastIndexOf(" - ")) == mpTitle)
if (isMainPage) 
{window.location="http://en.wikipedia.org/wiki/Main_Page_alternative_%28misty breeze%29";}