X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/76e3136f32e35ded2caf989b0bf699de64798921..a1f64c3f71e51745529a05c31891ee7af0b7f324:/src/main.js diff --git a/src/main.js b/src/main.js index f320d0b..a8269c6 100644 --- a/src/main.js +++ b/src/main.js @@ -3,7 +3,7 @@ import { refresh_page } from './lib/stores.js'; let myhistory = []; -const app = new App({ +const app = new App({ // eslint-disable-line no-unused-vars target: document.body }); @@ -24,7 +24,7 @@ function is_relative_url(url) { document.addEventListener('click', function (e) { // loop parent nodes from the target to the delegation node - for (var target = e.target; target && target != this; target = target.parentNode) { + for (var target = e.target; target && target !== this; target = target.parentNode) { if (target.matches('a')) { var target_url = target.href; @@ -41,8 +41,3 @@ document.addEventListener('click', function (e) { } } }); - -// deal with back-button and other user action -window.onpopstate = function () { - refresh_page(); -};