X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/0fda15db882f5e4019fd6ec8ae59b6fefd907104..e0d087f4a2b5fbc758de432f8932de296279a82f:/src/assets/js/searchpage.js?ds=sidebyside diff --git a/src/assets/js/searchpage.js b/src/assets/js/searchpage.js index a315338..be9c20a 100755 --- a/src/assets/js/searchpage.js +++ b/src/assets/js/searchpage.js @@ -292,12 +292,9 @@ function init_map_on_search_page(is_reverse_search, nominatim_results, request_l +function search_page_load() { -jQuery(document).ready(function () { - // - if (!$('#search-page,#reverse-page').length) { return; } - - var is_reverse_search = !!($('#reverse-page').length); + var is_reverse_search = window.location.pathname.match(/reverse/); var search_params = new URLSearchParams(window.location.search); @@ -452,4 +449,6 @@ jQuery(document).ready(function () { ); } } -}); +} + +