User:Tommy Kronkvist/common.js

From Wikispecies
Jump to navigation Jump to search

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/**  SCRIPT 1 ______________________________________________________________________________________
*    Automatically set all TOCs to collapsible
*    Author:  Not applicable (standard wiki code)
*    License: Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
*    Bug:     Collapses the TOC, but clicking the 'Show' link doesn't expand it again **/ 

function hideToc() { 
  var toc = document.getElementById('toc').getElementsByTagName('ul')[0]; 
  var toggleLink = document.getElementById('togglelink'); 
  toc.style.display = 'none'; 
} 
hideToc();

/**  SCRIPT 2 ______________________________________________________________________________________
*    Creates redirect pages for synonyms
*    Author:  Rillke
*    License: GPL v.3 **/ 

importScript('User:Rillke/createRedirects.js')

/**  SCRIPT 3 ______________________________________________________________________________________
*    Real-Time Recent Changes
*    Author: Krinkle **/ 

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/RTRC.js&action=raw&ctype=text/javascript');

/**  SCRIPT 4 ______________________________________________________________________________________
*    JavaWikiBrowser, a web version of AutoWikiBrowser
*    Author: Joeytje50 

importScriptURI('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript'); **/

/**  SCRIPT 5 ______________________________________________________________________________________
*    Wikipedia XTools gadget
*    Author: Hedonil
*    Currently not loaded: mw.loader.load('//meta.wikimedia.org/w/index.php?

title=User:Hedonil/XTools/XTools.js&action=raw&ctype=text/javascript'); **/