X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=asciidoc%2Fasciidoc.js;h=80d0f0325768079601673bc718ff33d21981e1dc;hp=5882248492cc64fc781c106dcd784da1bee14662;hb=7cbfd9192ee6ba3e660e12fb95a667ffeba183b8;hpb=110ebe8fe1fc1bfc6b28428e1c310704313819d2 diff --git a/asciidoc/asciidoc.js b/asciidoc/asciidoc.js index 5882248..80d0f03 100644 --- a/asciidoc/asciidoc.js +++ b/asciidoc/asciidoc.js @@ -7,6 +7,39 @@ var asciidoc = { + // toc generator + toc: function () { + var tocholder = $("#toc"); + if (!tocholder) { + return; + } + + tocholder.html(''); + tocholder.hide(); + + var html = "

Contents

"; + + if (n > 3) { + tocholder.html(html); + tocholder.show(); + } + }, + // footnote generator footnotes: function () { var noteholder = $("#footnotes"); @@ -61,5 +94,6 @@ var asciidoc = { $(document).ready(function(){ asciidoc.footnotes(); + asciidoc.toc(); });