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.
This commit is contained in:
parent
4ded44d18a
commit
2dfabc38f8
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue