diff --git a/src/main/resources/q-apps/q-apps.js b/src/main/resources/q-apps/q-apps.js index ff39ce72..56f13717 100644 --- a/src/main/resources/q-apps/q-apps.js +++ b/src/main/resources/q-apps/q-apps.js @@ -385,6 +385,20 @@ document.addEventListener('DOMContentLoaded', () => { }); }); +/** + * Handle app navigation + */ +navigation.addEventListener('navigate', (event) => { + let pathname = new URL(event.destination.url).pathname; + qortalRequest({ + action: "QDN_RESOURCE_DISPLAYED", + service: _qdnService, + name: _qdnName, + identifier: _qdnIdentifier, + path: (pathname.startsWith(_qdnBase)) ? pathname.slice(_qdnBase.length) : pathname + }); +}); + /** * Intercept image loads from the DOM */