User:Iggyvolz/common.js

function switchtotab(n) {	if(!document.getElementsByClassName('tabbernav')[0].childNodes[n].classList.contains('tabberactive')) {		document.getElementsByClassName('tabbernav')[0].childNodes[n].classList.add('tabberactive'); }	for(var i=0;i<document.getElementsByClassName('tabbernav')[0].childNodes.length;) {		if(i===n) {			break; }		if(document.getElementsByClassName('tabbernav')[0].childNodes[i].classList.contains('tabberactive')) {			document.getElementsByClassName('tabbernav')[0].childNodes[i].classList.remove('tabberactive'); }		i++; }	if(document.getElementsByClassName('tabberlive')[0].childNodes[n+1].classList.contains('tabbertabhide')) {		document.getElementsByClassName('tabberlive')[0].childNodes[n+1].classList.remove('tabbertabhide'); }	for(var i=1;i<document.getElementsByClassName('tabberlive')[0].childNodes.length;i++) {		if(i===n+1) {			break; }		if(!document.getElementsByClassName('tabberlive')[0].childNodes[i].classList.contains('tabbertabhide')) {			document.getElementsByClassName('tabberlive')[0].childNodes[i].classList.add('tabbertabhide'); }	} } if(new RegExp("#Tab[0-9]").test(location.hash)) {	switchtotab(location.hash.charAt(location.hash.length - 1)*1); }