Update address bar when navigating within an app.

This commit is contained in:
CalDescent 2023-04-09 17:11:20 +01:00
parent 3dcd9d237c
commit 3296779125

View File

@ -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
*/