]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Use DOM loaded event for TOC (Thanks TonyC)
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 9 Apr 2014 18:37:24 +0000 (20:37 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 9 Apr 2014 18:37:24 +0000 (20:37 +0200)
See http://code.i3wm.org/i3-website/commit/?id=d8e239e6 for the original
commit for the i3 website. This one is for documentation built from git.

docs/asciidoc-git.conf

index ff1ca4487e29f755cfed9a160be7d97e2ab215df..3d42bca8a9999309c3e8b961d9c377de5896585f 100644 (file)
@@ -560,7 +560,7 @@ ifdef::linkcss[]
 <script type="text/javascript">\r
 # Escape as CDATA to pass validators.\r
 /*<![CDATA[*/\r
-window.onload = function()\{asciidoc.footnotes();{toc? asciidoc.toc({toclevels});}\}\r
+document.addEventListener("DOMContentLoaded", function()\{asciidoc.footnotes();{toc? asciidoc.toc({toclevels});}\}, false);
 /*]]>*/\r
 </script>\r
 <script type="text/javascript" src="{scriptsdir=.}/asciidoc-xhtml11.js"></script>\r
@@ -569,7 +569,7 @@ ifndef::linkcss[]
 <script type="text/javascript">\r
 # Escape as CDATA to pass validators.\r
 /*<![CDATA[*/\r
-window.onload = function()\{asciidoc.footnotes();{toc? asciidoc.toc({toclevels});}\}\r
+document.addEventListener("DOMContentLoaded", function()\{asciidoc.footnotes();{toc? asciidoc.toc({toclevels});}\}, false);
 include1::{scriptsdir=./javascripts}/asciidoc-xhtml11.js[]\r
 /*]]>*/\r
 </script>\r