Ako zistiť zmenu URL adresy v JavaScripte bez refreshnutia stránky (cez ajax)
let lastUrl = location.href; new MutationObserver(() => { const url = location.href; if (url !== lastUrl) { lastUrl = url; onUrlChange(); } }).observe(document, {subtree: true, childList: true}); function onUrlChange()…

