From 4276773fb1a816611ef83fca6943df6618add896 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 31 Jul 2006 17:05:47 +0200 Subject: [PATCH] Try to work around broken IE JavaScript magic in the fullscreen mode. --- pr0n-fullscreen.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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() -- 2.39.2