User:NxBot/monobook.js

//importScript("User:Ipatrol/popups.js");

/*var nx_bw_strict = true; importScript("User:Nx/Scripts/Botwarn.js"); importScript("User:Nx/Scripts/Curse.js");

importScript("User:Nx/Scripts/Smileybox.js"); importScript("User:Nx/Scripts/Smileylist.js");

//var botswitch_altacc = "Nx"; //importScript("User:Nx/Scripts/Botswitch.js")

importScript("User:Nx/Scripts/Autoarchive.js"); importScript("User:Nx/Scripts/Shared.js"); importScript("User:Nx/Scripts/Resurrect.js"); importScript("User:Nx/Scripts/Vandallog.js");

/* Sandbox

if (typeof modifytabs_options_delete == 'undefined') { var modifytabs_options_delete = ['delete','vaporise','euthanize']; }

function modifytabs { if (ca_delete = document.getElementById('ca-delete')) { ca_delete.firstChild.innerHTML = modifytabs_options_delete[Math.ceil(modifytabs_options_delete.length*Math.random)-1];; } }

addOnloadHook(modifytabs)

function randomCP { if (n_randompage = document.getElementById('n-randompage')) { if (wgNamespaceNumber == 100) { n_randomcp = document.createElement('li'); n_randomcp.id = "n-randomcp"; n_randomcp.innerHTML = "Random CP page'; n_randompage.parentNode.insertBefore(n_randomcp,n_randompage.nextSibling); } } }

addOnloadHook(randomCP)

var REG_MSIE = /msie (5|6)/i; var REG_COMPAT = /backcompat/i;

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 iehover_hide(container) { var hovertargets = getElementsByClassName(container,"*","hover_target"); for (var j = 0; j< hovertargets.length; j++) { target = hovertargets[j]; target.style.display="none"; } }

function iehover_display(container) { var hovertargets = getElementsByClassName(container,"*","hover_target"); for (var j = 0; j< hovertargets.length; j++) { target = hovertargets[j]; if (hasClass(target,"inline")) { target.style.display="inline"; } else { target.style.display="block"; }   } }

function iehover { if(!REG_MSIE.test(navigator.userAgent) && !REG_COMPAT.test(window.document.compatMode)) { return; } var hovercontainers = getElementsByClassName(document.getElementById("bodyContent"),"*","hover_collapse"); for (var i = 0; i<hovercontainers.length; i++) { container = hovercontainers[i]; container.attachEvent('onmouseenter',function(e) {iehover_display(e.srcElement);}); container.attachEvent('onmouseleave',function(e) {iehover_hide(e.srcElement);}); iehover_hide(container); } }

addOnloadHook(iehover);