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) {
let frag = document.location.hash.replace(/^#/, '');
let frag = location.hash.replace(/^#/, '');
if (frag == 'all') {
clearForm();

View file

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