From 65923a609e55d21ea288be703bf78c5df97d7b6b Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Mon, 7 Dec 2020 16:03:15 +0100 Subject: [PATCH] footnotes clicking back and forth --- assets/js/sandpoints.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/assets/js/sandpoints.js b/assets/js/sandpoints.js index 3bde91e..8021e55 100644 --- a/assets/js/sandpoints.js +++ b/assets/js/sandpoints.js @@ -64,20 +64,12 @@ window.addEventListener('DOMContentLoaded', (e) => { } - document.querySelectorAll('#TableOfContents a').forEach(i => { + document.querySelectorAll('#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref').forEach(i => { i.addEventListener('click', e => { setTimeout(() => { window.scrollBy({top: document.querySelector('.header').clientHeight * -1.25, behavior: 'smooth'})}, 50); }) }) - - document.querySelectorAll('.anchorz').forEach(i => { - i.addEventListener('click', e => { - setTimeout(() => { - window.scrollBy({ top: document.querySelector('.header').clientHeight * -1.25, behavior: 'smooth' }) - }, 50); - }) - }) }) toggleAllLinks = function () {