remove debug statements
This commit is contained in:
parent
656f674843
commit
f70ae95272
@ -136,13 +136,9 @@ for (const entry of pagesIndex) {
|
|||||||
let current_uri = window.location.pathname;
|
let current_uri = window.location.pathname;
|
||||||
|
|
||||||
const sidebar = document.getElementById("sidebar")!.children[0]! as HTMLElement;
|
const sidebar = document.getElementById("sidebar")!.children[0]! as HTMLElement;
|
||||||
console.log(sidebar);
|
|
||||||
const links = sidebar.querySelectorAll("a");
|
const links = sidebar.querySelectorAll("a");
|
||||||
for (const link of [...links]) {
|
for (const link of [...links]) {
|
||||||
if (link.getAttribute("href") === current_uri) {
|
if (link.getAttribute("href") === current_uri) {
|
||||||
console.log(sidebar.offsetTop);
|
|
||||||
console.log(link.offsetTop);
|
|
||||||
|
|
||||||
sidebar.scrollTop =
|
sidebar.scrollTop =
|
||||||
link.offsetTop - sidebar.offsetTop - 250;
|
link.offsetTop - sidebar.offsetTop - 250;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user