Bugfix: Use DOM loaded event for TOC (Thanks TonyC)

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.
next
Michael Stapelberg 2014-04-09 20:37:24 +02:00
parent 4ded44d18a
commit 2dfabc38f8
1 changed files with 2 additions and 2 deletions

View File

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