about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/main.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/main.js b/scripts/main.js
index e47bf88..1e3b5b6 100644
--- a/scripts/main.js
+++ b/scripts/main.js
@@ -86,4 +86,12 @@
 		rehash();
 		window.addEventListener("hashchange", rehash, false);
 	}
+
+	// Wait for the DOM to be ready
+	document.addEventListener('DOMContentLoaded', load_done, false);
+	document.onreadystatechange = function() {
+		if (document.readyState === 'interactive') {
+			load_done();
+		}
+	};
 })();