User:Bootcher/common.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MultipleFileDelete/code.js',    ] });

//find any MyTabs (if any) eles = $('.MyTabs');

//A MyTab Exists => load custom Javascript if(eles && eles.length > 0) {   $("table.MyTabs div").on("click", function { TabClick(this); } ); TabClick; }

function TabClick(sender) {   var sValue = ''; if (typeof sender == 'object') {		sValue = $(sender).attr('data-tabname'); }	else if (typeof sender == 'string') {		sValue = sender; }	else {	   sValue = "MAIN"; }	//hide all cotent divs + remove currenttab style $("div .TabButton").removeClass("currentTab"); $("div .TabContent").addClass("hide"); //display current content div and set currenttab style $("div .TabButton[data-tabname=" + sValue + "]").addClass("currentTab"); $("#TabDiv_" + sValue).removeClass("hide"); }