fix back button

This commit is contained in:
Rhiannon Morris 2020-08-29 14:28:21 +02:00
parent cf8468b123
commit 91af2d9411

View file

@ -59,12 +59,12 @@ function activateButton(button, doPush = true, firstLoad = false) {
} }
function useFragment(firstLoad = false) { function useFragment(firstLoad = false) {
let button; let button = altButtons[0];
let frag = location.hash.replace(/^#/, ''); let frag = location.hash.replace(/^#/, '');
if (frag) { if (frag) {
let selected = document.getElementById(frag); let selected = document.getElementById(frag);
button = selected ? selected : altButtons[0]; if (selected) button = selected;
} }
let id; let id;