User:Tierrie/global.js

var hasClass = (function { var reCache = {}; return function (element, className) { return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className); }; });

function initSpoilers { contentstart = document.getElementById("bodyContent"); var Divs= document.getElementsByTagName("div"); for (i=0;i" + "" + "" + " "; } } }

spoilers = true; function loadSpoilers { if(spoilers) initSpoilers; }

addOnloadHook(loadSpoilers);