X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b6a4da775945856b07fdc8f1330a86f67e329ac9..e8f6c06ca81e4ebd8d244e3863d21517d87b6620:/underlays/javascript/ikiwiki.js?ds=sidebyside diff --git a/underlays/javascript/ikiwiki.js b/underlays/javascript/ikiwiki.js index 1252f244f..aebc5cf7e 100644 --- a/underlays/javascript/ikiwiki.js +++ b/underlays/javascript/ikiwiki.js @@ -10,11 +10,13 @@ if (document.addEventListener) { // other browsers window.onload = run_hooks_onload; +var onload_done = 0; + function run_hooks_onload() { // avoid firing twice - if (arguments.callee.done) + if (onload_done) return; - arguments.callee.done = true; + onload_done = true; run_hooks("onload"); }