From: Steinar H. Gunderson Date: Mon, 31 Jul 2006 15:05:47 +0000 (+0200) Subject: Try to work around broken IE JavaScript magic in the fullscreen mode. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=4276773fb1a816611ef83fca6943df6618add896 Try to work around broken IE JavaScript magic in the fullscreen mode. --- diff --git a/pr0n-fullscreen.js b/pr0n-fullscreen.js index f087a8f..d28c2a4 100644 --- a/pr0n-fullscreen.js +++ b/pr0n-fullscreen.js @@ -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()