forked from Qortal/qortal
Update address bar when navigating within an app.
This commit is contained in:
parent
3dcd9d237c
commit
3296779125
@ -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
|
* Intercept image loads from the DOM
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user