X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/15f23469d97b768501bac8b58081cb61bcdd8b4b..b4c0bfd8fa324a4c9d8b24e8753d134524ea61c7:/public/javascripts/pngfix.js diff --git a/public/javascripts/pngfix.js b/public/javascripts/pngfix.js new file mode 100644 index 000000000..0fdefc6b2 --- /dev/null +++ b/public/javascripts/pngfix.js @@ -0,0 +1,25 @@ +function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher. +{ + for(var i=0; i 0) + { + var imgID = (img.id) ? "id='" + img.id + "' " : "" + var imgClass = (img.className) ? "class='" + img.className + "' " : "" + var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " + var imgStyle = "display:inline-block;" + img.style.cssText + if (img.align == "left") imgStyle = "float:left;" + imgStyle + if (img.align == "right") imgStyle = "float:right;" + imgStyle + if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle + var strNewHTML = "" + img.outerHTML = strNewHTML + i = i-1 + } + } +} +window.attachEvent("onload", correctPNG);