location is a global also

This commit is contained in:
Rhiannon Morris 2020-08-16 11:28:16 +02:00
parent 14484184e3
commit a212487613
2 changed files with 2 additions and 2 deletions

View file

@ -81,7 +81,7 @@ function makeFragment() {
} }
function useFragment(firstLoad) { function useFragment(firstLoad) {
let frag = document.location.hash.replace(/^#/, ''); let frag = location.hash.replace(/^#/, '');
if (frag == 'all') { if (frag == 'all') {
clearForm(); clearForm();

View file

@ -60,7 +60,7 @@ function activateButton(button, doPush = true, firstLoad = false) {
function useFragment(firstLoad = false) { function useFragment(firstLoad = false) {
let button = document.querySelector('#alts input'); let button = document.querySelector('#alts input');
let frag = document.location.hash.replace(/^#/, ''); let frag = location.hash.replace(/^#/, '');
if (frag) { if (frag) {
let button0 = document.getElementById(frag); let button0 = document.getElementById(frag);
if (button0) button = button0; if (button0) button = button0;