From: Steinar H. Gunderson Date: Sat, 9 Dec 2006 16:23:22 +0000 (+0100) Subject: Fix IE opacity error in indexed mode. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=e5c62d73d49624d5d39317f141700c607bc44344 Fix IE opacity error in indexed mode. --- diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index d7c2c7f..857f3d9 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -144,8 +144,13 @@ function set_opacity(id, amount) elem.style.filter = ""; } elem.style.filter += "alpha(opacity=" + (amount*100.0) + ")"; - } else { - elem.filters.alpha.opacity = (amount * 100.0); + } else { + // ugh? this seems to break in color index mode... + if (typeof(elem.filters) == 'unknown') { + elem.style.filter = "alpha(opacity=" + (amount*100.0) + ")"; + } else { + elem.filters.alpha.opacity = (amount * 100.0); + } } } else { // no alpha support if (amount > 0.5) {