From 039f0b937b04a99d381590d2f6cbf34e9e1eaae4 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Mon, 7 Dec 2020 16:09:52 +0100 Subject: [PATCH] fixed top scroll for footnotes clicks --- .../Drawwell/SandpointsTheme/assets/js/sandpoints.js | 10 +--------- _vendor/modules.txt | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js index 3bde91e..8021e55 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/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 () { diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 23adbca..c25fe15 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201207142206-ba2a130517be +# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201207150315-65923a609e55