User:Shijun/monobook.js

From NetHackWiki
< User:Shijun
Revision as of 19:39, 11 November 2010 by Tjr (talk | contribs) (Text replace - "nethack.wikia.com" to "nethackwiki.com")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
// from http://en.wikipedia.org/wiki/MediaWiki:Common.js
importedScripts = {}; // object keeping track of included scripts, so a script ain't included twice
function importScript( base, page )
{
    if( importedScripts[page] ) {
        return;
    }
    importedScripts[page] = true;
    var url = base
            + '/index.php?title='
            + encodeURIComponent( page.replace( / /g, '_' ) )
            + '&action=raw&ctype=text/javascript&dontcountme=s';
    var scriptElem = document.createElement( 'script' );
    scriptElem.setAttribute( 'src' , url );
    scriptElem.setAttribute( 'type' , 'text/javascript' );
    document.getElementsByTagName( 'head' )[0].appendChild( scriptElem );
}

//importScript('http://nethackwiki.com', 'User:Shijun/ajax.js');
importScript('http://nethackwiki.com', 'User:Shijun/qpreview.js');