Abrir menu principal

UESPWiki β

Alterações

Utilizador:Nx/monobook.js

2 068 bytes adicionados, 13h35min de 23 de março de 2010
m
comments in local time
//<pre>
importScript('UESPWiki:Javascript/subpages.js');
importScript('UESPWiki:Javascript/addpurge.js');
importScript('UESPWiki:Javascript/comments in local time.js');
importScript('User:Nx/navpopup.js');
importStylesheet('User:Nx/navpopup.css');

/*workaround for IE6 which doesn't support :hover on any element*/
var REG_MSIE = /msie (5|6)/i;
var REG_COMPAT = /backcompat/i;

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);

var button = {
"imageFile": "images/images.new/f/fb/MW-Icon-scroll_open_01.png", // image to be shown on the button (may be a full URL too), 22x22 pixels
"speedTip": "Welcome", // text shown in a tooltip when hovering the mouse over the button
"tagOpen": "{{subst" + ":Project:Messages/Welcome}}", // the text to use to mark the beginning of the block
"tagClose": "", // the text to use to mark the end of the block (if any)
"sampleText": "" // the sample text to place inside the block
};
mwCustomEditButtons.push(button);

//</pre>
438
edições