parent
716a77a848
commit
0f1a774b79
|
@ -42,10 +42,8 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
|
|
||||||
// Set up a nav pane
|
// Set up a nav pane
|
||||||
const toc_pane = document.getElementById("toc-nav");
|
const toc_pane = document.getElementById("toc-nav");
|
||||||
populate_nav(toc_pane,
|
const headings = document.querySelectorAll(`#content :is(h2, h3, h4, h5, h6, .h2, .h3, .h4, .h5, .h6)`);
|
||||||
`#content h2, #content h3, #content h4, #content h5, #content h6
|
populate_nav(toc_pane, headings, ["py-0"]);
|
||||||
#content .h1, #content .h2, #content .h3, #content .h4, #content .h5, #content .h6`,
|
|
||||||
["py-0"]);
|
|
||||||
|
|
||||||
// activate pref buttons selected by pref cookies or localStorage
|
// activate pref buttons selected by pref cookies or localStorage
|
||||||
const in_localStorage = ["deftab", "reflinks"];
|
const in_localStorage = ["deftab", "reflinks"];
|
||||||
|
|
|
@ -152,7 +152,7 @@ $(document)
|
||||||
$(function () {
|
$(function () {
|
||||||
const contentElement = $('#content.ietf-auto-nav');
|
const contentElement = $('#content.ietf-auto-nav');
|
||||||
if (contentElement.length > 0) {
|
if (contentElement.length > 0) {
|
||||||
const heading_selector = ":is(h2, h3, h4, h5, h6, .nav-heading):not([style='display:none']):not(.navskip)";
|
const heading_selector = ":is(h2, h3, h4, h5, h6, .h2, .h3, .h4, .h5, .h6, .nav-heading):not([style='display:none']):not(.navskip)";
|
||||||
const headings = contentElement
|
const headings = contentElement
|
||||||
.find(heading_selector)
|
.find(heading_selector)
|
||||||
.filter((i, el) => !el.closest(".navskip"));
|
.filter((i, el) => !el.closest(".navskip"));
|
||||||
|
|
Loading…
Reference in a new issue