User:Lily Towers/statuschanger.js

In this article, we will explore the exciting world of User:Lily Towers/statuschanger.js and everything that this theme has to offer. From its origins to its impact today, we will immerse ourselves in a journey of discovery to fully understand the importance and relevance of User:Lily Towers/statuschanger.js in our lives. Through an exhaustive analysis, we will examine the different facets and aspects that make User:Lily Towers/statuschanger.js a topic of universal interest, addressing everything from its social impact to its global implications. With interviews with experts, statistical data and diverse perspectives, this article aims to be a complete guide that unravels the mysteries and virtues of User:Lily Towers/statuschanger.js, offering a comprehensive vision that allows the reader to delve into the fascinating universe of this topic.
topaz.statuschanger = new Object();

/* configuration */
// change these to whatever you'd like to show up on your status page.
topaz.statuschanger.statuscode = {
  online:'<font color="green">online</font> ]',
  around:'<font color="orange">around</font> ]',
  offline:'<font color="red">sleeping</font> ]',
  working:'<font color="black">wor</font><font color="red">king</font> ]',
};
// 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"){setTimeout('topaz.statuschanger.oldonload()',50);}
  if (topaz.statuschanger.usepersonalbar) {
    var a = topaz.wputil.addsidepanelbutton("p-personal", "Online",
        'javascript:topaz.statuschanger.setstatus("online")');
    var b = topaz.wputil.addsidepanelbutton("p-personal", "Around",
        'javascript:topaz.statuschanger.setstatus("around")');
    var c = topaz.wputil.addsidepanelbutton("p-personal", "Offline",
        'javascript:topaz.statuschanger.setstatus("offline")');
    var d = topaz.wputil.addsidepanelbutton("p-personal", "Working",
        'javascript:topaz.statuschanger.setstatus("working")');
    
    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", "Sleeping",
        'javascript:topaz.statuschanger.setstatus("sleeping")'
    );
    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,
      true);
};