Difference between revisions of "MediaWiki:Common.js"
From GGBN Wiki
(move toolbox and set portal link texts as title attributes (for mouse-over)) |
(No difference)
|
Revision as of 11:40, 19 November 2015
/* Any JavaScript here will be loaded for all users on every page load. */
document.getElementsByTagName("body")[0].classList.remove("vector-animateLayout");
if(skin=="ggbn"){
toolbox = document.getElementById("p-tb");
headmenu = document.getElementById("mw-head");
if(toolbox && headmenu){
toolbox.parentNode.removeChild(toolbox);
toolbox.setAttribute("class","vectorTabs");
headmenu.appendChild(toolbox);
}
portalLinks = document.getElementsByClassName("portal");
for(i=0;i<portalLinks.length;i++){
var portalLink = portalLinks[i];
portalLink.setAttribute('title',portalLink.getAttribute('id').substring(2).replace(new RegExp('_', 'g'), ' '));
}
}