]> git.sesse.net Git - pr0n/commitdiff
Try to work around broken IE JavaScript magic in the fullscreen mode.
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 31 Jul 2006 15:05:47 +0000 (17:05 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 31 Jul 2006 15:05:47 +0000 (17:05 +0200)
pr0n-fullscreen.js

index f087a8f185f8f953cd7f8cb935f6da4b272e41c8..d28c2a4421ccbacbcec99d7266c3be6cf01ab4fb 100644 (file)
@@ -70,8 +70,11 @@ function prepare_preload(img, width, height, evt, filename)
                preload.parentNode.removeChild(preload);
        }
                
-//     img.onload = function() { display_image(width, height, evt, filename, "preload"); }
-       img.onload = "display_image(" + width + "," + height + ",\"" + evt + "\",\"" + filename + "\",\"preload\");";
+       if (document.all) {  // IE-specific
+               img.onload = "display_image(" + width + "," + height + ",\"" + evt + "\",\"" + filename + "\",\"preload\");";
+       } else {
+               img.onload = function() { display_image(width, height, evt, filename, "preload"); }
+       }
 }
 
 function relayout()