From c543dc1f2306d3bc420c8465e9326660b75b1963 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 1 Sep 2024 11:06:20 +0200 Subject: [PATCH] fix: anchor links Signed-off-by: David Mehren --- public/js/extra.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/extra.js b/public/js/extra.js index 91321d4fc..439ee983f 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -847,7 +847,7 @@ const anchorForId = id => { const anchor = document.createElement('a') anchor.ariaHidden = 'true' anchor.className = 'anchor hidden-xs' - anchor.href = `${document.location.origin}${document.location.pathname}#${id}` + anchor.href = new URL(`#${id}`, document.location).toString() anchor.innerHTML = '' anchor.title = id return anchor