From: Luciano Montanaro Date: Sat, 2 Jul 2011 08:01:33 +0000 (+0200) Subject: Fix addEventListener call X-Git-Tag: tags/0.4.1~6 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=b72f8d550d21b6a3f326b97e2608b36ebcc059e3;p=quandoparte Fix addEventListener call addEventListener requires three parameters, even if konqueror/chromium work with only two :( And it does not work on many versions of explorer, I am told --- diff --git a/www/screenshot-generator.js b/www/screenshot-generator.js index e647660..78c6582 100644 --- a/www/screenshot-generator.js +++ b/www/screenshot-generator.js @@ -31,4 +31,8 @@ function build_screenshot_list() generate_div(screenshots[key], key, screenshots); } -window.addEventListener('load', build_screenshot_list); +if (window.addEventListener) { + window.addEventListener('load', build_screenshot_list, false); +} else if (window.attachEvent) { + window.attachEvent('onload', build_screenshot_list); +}