Jump to content

User:Topaz/usermessagechanger.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Topaz (talk | contribs) at 22:28, 3 September 2006 (minor fixes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
topaz.usermessagechanger = new Object();

/* configuration */
// this will replace the old message
topaz.usermessagechanger.newmessage = "SOMETHING ELSE LOL";
/* end configuration */

topaz.usermessagechanger.oldonload = window.onload;
window.onload = function() {
  if (typeof topaz.usermessagechanger.oldonload == "function") topaz.usermessagechanger.oldonload();
  var divlist = topaz.util.getobj("bodyContent").getElementsByTagName("div");
  for(var i=0; i<divlist.length; i++) {
    if (divlist[i].className == "usermessage") {
      divlist[i].innerHTML = topaz.usermessagechanger.newmessage;
    }
  }
};