User:Mr.Z-man/monobook.js

Wikimania 2008 Alexandria :: Change the shape of wisdom

Note: After publishing, 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 / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
function importStylesheet(page) {
  if (page.indexOf('http://') == -1 && page.indexOf('https://') == -1 && page.indexOf('file:///') == -1)
     page = wgScript + '?action=raw&ctype=text/css&smaxage=0&title='
     + encodeURIComponent(page.replace(/ /g,'_'))
  return document.createStyleSheet ? document.createStyleSheet(page) : appendCSS('@import "' + page + '";')
}
 
function appendCSS(text){
 var s = document.createElement('style')
 s.setAttribute('type', 'text/css')
 if (s.styleSheet) s.styleSheet.cssText = text //IE
 else s.appendChild(document.createTextNode(text))
 document.getElementsByTagName('head')[0].appendChild(s)
 return s
}

if(document.URL.indexOf('rtl=1') != -1) importStylesheet('http://wikimania2008.wikimedia.org/w/index.php?title=MediaWiki:Gadget-rtl.css&action=raw&ctype=text/css');