mirror of
https://github.com/Qortal/qortal.git
synced 2025-03-13 11:12:31 +00:00
Added support for hash routing in URL shown in address bar.
This commit is contained in:
parent
ce52b39495
commit
7f53983d77
@ -389,13 +389,14 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
* Handle app navigation
|
||||
*/
|
||||
navigation.addEventListener('navigate', (event) => {
|
||||
let pathname = new URL(event.destination.url).pathname;
|
||||
const url = new URL(event.destination.url);
|
||||
let fullpath = url.pathname + url.hash;
|
||||
qortalRequest({
|
||||
action: "QDN_RESOURCE_DISPLAYED",
|
||||
service: _qdnService,
|
||||
name: _qdnName,
|
||||
identifier: _qdnIdentifier,
|
||||
path: (pathname.startsWith(_qdnBase)) ? pathname.slice(_qdnBase.length) : pathname
|
||||
path: (fullpath.startsWith(_qdnBase)) ? fullpath.slice(_qdnBase.length) : fullpath
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user