]> git.sesse.net Git - pr0n/blobdiff - files/pr0n-fullscreen.js
Fix IE opacity error in indexed mode.
[pr0n] / 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) {