User:Kernigh/monobook.js

From RogueBasin
Jump to: navigation, search

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: Clear the cache in Tools → Preferences
// <pre>
 
/*
 * Monobook script of Kernigh at RogueBasin - public domain
 */
 
// load a script from some MediaWiki
function loadScript( wikiPhp, file ) {
  document.write('<script type="text/javascript" src="' +
    wikiPhp + '?title=' + file + '&action=raw' +
    '&ctype=text/javascript&dontcountme=s"></script>');
}
 
// tagline.js config
scr = new Object();
scr.wikiUrl = "http://roguebasin.roguelikedevelopment.org/index.php?title=";
scr.wikiPhp = "http://roguebasin.roguelikedevelopment.org/index.php";
 
// wikialink.js config
function wikiabuttons() {
  addwb( "action", "wikihack", "nethack.wikia.com/wiki/", "" );
}
 
<!-- Hotlinks! These should be in my cache because I visit wikia.com often. -->
loadScript( "http://www.wikia.com/index.php", "User:Kernigh/tagline.js" );
loadScript( "http://www.wikia.com/index.php", "User:Kernigh/wikialink.js" );
 
// </pre>
Personal tools