MediaWiki:Common.js/Hidecolfix

/* Any JavaScript here will be loaded for all users on every page load. */ /* A function to fix the CSS problems due to * * IE6 not implementing adjacent sibling selector * * IE7 not implementing display:table-cell; from CSS 2 function hideColFix { var browserName=navigator.appName; var browserVer =parseInt(navigator.appVersion);

if (browserName=="Microsoft Internet Explorer"){ fixTable("hidecol1",0); fixTable("hidecol2",1); fixTable("hidecol3",2); fixTable("hidecol4",3); fixTable("hidecol5",4); fixTable("hidecol6",5); fixTable("hidecol7",6); fixTable("hidecol8",7); fixTable("hidecol9",8); fixTable("hidecol10",9); } } function fixTable(className, idx){ var theTables = getElementsByClassName(document, "table", className); for (var i=0; i < theTables.length; i++){ var curTable = theTables[i]; var theRows = curTable.rows; if (theRows[0].cells.length < idx) continue; // not enough columns, skip

curTable.className = curTable.className.replace(className, ''); for (var j=0; j < theRows.length; j++){ theRows[j].cells[idx].style.display='none'; }	} } addOnloadHook(hideColFix); /* */