remove inline css

This commit is contained in:
anarsec 2023-07-06 20:39:53 +00:00
parent 6835d16b44
commit 89dd57f725
No known key found for this signature in database
3 changed files with 6 additions and 4 deletions

View file

@ -11,8 +11,7 @@
function isVisible(tocIndex) {
const current = navSections[tocIndex];
const next = tocIndex < tocItems.length - 1 ? navSections[tocIndex + 1]
: document.querySelectorAll("section.section").item(1);
const next = tocIndex < tocItems.length - 1 ? navSections[tocIndex + 1] : document.querySelector("section.section").nextElementSibling;
const c = current.getBoundingClientRect();
const n = next.getBoundingClientRect();