Difference between revisions of "MediaWiki:Common.js"

From GGBN Portal Software
Jump to: navigation, search
(Created page with "Any JavaScript here will be loaded for all users on every page load.: document.getElementsByTagName("body")[0].classList.remove("vector-animateLayout"); if(skin=="ggbn_g...")
 
(No difference)

Latest revision as of 14:00, 3 February 2016

/* Any JavaScript here will be loaded for all users on every page load. */
document.getElementsByTagName("body")[0].classList.remove("vector-animateLayout");

if(skin=="ggbn_gps"){
	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'), ' '));
	}
}