set doneOnloadHook _before_ calling any hooks, so they don't get run twice if there...
authorIlmari Karonen <vyznev@users.mediawiki.org>
Sat, 13 Jan 2007 00:15:51 +0000 (00:15 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Sat, 13 Jan 2007 00:15:51 +0000 (00:15 +0000)
skins/common/wikibits.js

index 48f4bfc..1b883ec 100644 (file)
@@ -924,6 +924,10 @@ function runOnloadHook() {
                return;
        }
 
+       // set this before running any hooks, since any errors below
+       // might cause the function to terminate prematurely
+       doneOnloadHook = true;
+
        histrowinit();
        unhidetzbutton();
        tabbedprefs();
@@ -937,8 +941,6 @@ function runOnloadHook() {
        for (var i = 0; i < onloadFuncts.length; i++) {
                onloadFuncts[i]();
        }
-
-       doneOnloadHook = true;
 }
 
 //note: all skins should call runOnloadHook() at the end of html output,