X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/4cef4fd8107653656e83662f71c4cdaeb94708ab..586f7f836124af2ea87b5f580c9e92b671ba4b1f:/src/assets/js/controller.js?ds=inline diff --git a/src/assets/js/controller.js b/src/assets/js/controller.js index 4196151..a9cb80e 100644 --- a/src/assets/js/controller.js +++ b/src/assets/js/controller.js @@ -3,9 +3,9 @@ jQuery(document).ready(function () { function parse_url_and_load_page() { // 'search', 'reverse', 'details' - var pagename = window.location.pathname.replace('.html', '').replace(/.+\//, ''); + var pagename = window.location.pathname.replace('.html', '').replace(/^.*\//, ''); - if (pagename === '') pagename = 'search' + if (pagename === '') pagename = 'search'; $('body').attr('id', pagename + '-page'); @@ -63,6 +63,7 @@ jQuery(document).ready(function () { $(document).on('click', 'a', function (e) { var target_url = $(this).attr('href'); if (!is_relative_url(target_url)) return; + if ($(this).parents('#last-updated').length !== 0) return; e.preventDefault(); e.stopPropagation();