User:Dhraakellian/monobook.js
< User:Dhraakellian
Jump to navigation
Jump to search
Revision as of 18:35, 10 March 2007 by Dhraakellian (talk | contribs) (MindlessXD told me to do this)
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/*<nowiki>*/ function addBotBox() { var article = document.getElementById("ca-history").firstChild.href.match( /title=(.*?)&/ )[1]; var sidebar = document.getElementById("column-one"); var botbox = document.createElement("div"); botbox.setAttribute("id", "p-bb") botbox.setAttribute("class", "portlet"); botbox.appendChild(document.createElement("h5")); botbox.firstChild.appendChild(document.createTextNode("MindlessBot")); var div = botbox.appendChild(document.createElement("div")); div.setAttribute("class", "pBody"); ul = div.appendChild(document.createElement("ul")); /* {{songlink}} */ var songlink = ul.appendChild(document.createElement("li")); songlink.setAttribute("id", "t-songlink"); songlink.appendChild(document.createElement("a")); songlink.firstChild.setAttribute("href", "http://it.travisbsd.org/foo/lyriki/bot/mindlessbot_songlink.php?title=" + article); songlink.firstChild.appendChild(document.createTextNode("{{song link}}")); /* {{song}} */ var song = ul.appendChild(document.createElement("li")); song.setAttribute("id", "t-song"); song.appendChild(document.createElement("a")); song.firstChild.setAttribute("href", "http://it.travisbsd.org/foo/lyriki/bot/mindlessbot_song.php?title=" + article); song.firstChild.appendChild(document.createTextNode("{{song}}")); sidebar.appendChild(botbox); } window.addEventListener( "load" , addBotBox , false ); /*</nowiki>*/