MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

/* Scripts specific to Internet Explorer */ if (navigator.appName == "Microsoft Internet Explorer") {   /** Internet Explorer bug fix ************************************************** *    *  Description: Fixes IE horizontal scrollbar bug * Maintainers: User:Tom-? */   var oldWidth; var docEl = document.documentElement; function fixIEScroll {       if (!oldWidth || docEl.clientWidth > oldWidth) doFixIEScroll; else setTimeout(doFixIEScroll, 1); oldWidth = docEl.clientWidth; }   function doFixIEScroll { docEl.style.overflowX = (docEl.scrollWidth - docEl.clientWidth < 4) ? "hidden" : ""; }   document.attachEvent("onreadystatechange", fixIEScroll); document.attachEvent("onresize", fixIEScroll); // In print IE (7?) does not like line-height appendCSS( '@media print { sup, sub, p, .documentDescription { line-height: normal; }}'); // IE overflow bug appendCSS('div.overflowbugx { overflow-x: scroll !important; overflow-y: hidden !important; } div.overflowbugy { overflow-y: scroll !important; overflow-x: hidden !important; }'); // IE zoomfix // Use to fix right floating div/table inside tables appendCSS('.iezoomfix div, .iezoomfix table { zoom: 1;}'); // Import scripts specific to Internet Explorer 6 if (navigator.appVersion.substr(22, 1) == "6") { importScript("MediaWiki:Common.js/IE60Fixes.js") } }