Fix IE opacity error in indexed mode.
authorSteinar H. Gunderson <sesse@debian.org>
Sat, 9 Dec 2006 16:23:22 +0000 (17:23 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Sat, 9 Dec 2006 16:23:22 +0000 (17:23 +0100)
files/pr0n-fullscreen.js

index d7c2c7fda55ce027ee9d1f8382835d1252c762ef..857f3d9c27d654801199142459c933ea60a5277e 100644 (file)
@@ -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) {