User:Galil/monobook.js

/* Correctly handle PNG transparency in Internet Explorer. Copy this to /monobook.js in your user-space to use. Author: User:Galil */ window.onload = function { var IMG_Spacer = "http://gw.gamewikis.org/images/5/52/Spacer.gif"; var arVersion = navigator.appVersion.split("MSIE"); var version = parseFloat(arVersion[1]); if ((version >= 5.5)) {     var imgs = document.getElementsByTagName('IMG'); for(var i=0; i<imgs.length; i++) {        var img = imgs[i]; if (img.src.match(/.png$/i)) {           img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src + "', sizingMethod='scale')"; img.src = IMG_Spacer; }     }   } } /* */