Open dialog when receiving an appropriate URI query string.
This commit is contained in:
parent
1df1bb361e
commit
614961b220
1 changed files with 5 additions and 2 deletions
|
|
@ -79,8 +79,6 @@ class RenderScripture {
|
||||||
|
|
||||||
constructor(dialog) {
|
constructor(dialog) {
|
||||||
this.dialog = dialog;
|
this.dialog = dialog;
|
||||||
const url = new URL(document.URL);
|
|
||||||
console.log(parseRef(url.searchParams.get('cite')));
|
|
||||||
|
|
||||||
//history.replaceState({dialog: false}, '');
|
//history.replaceState({dialog: false}, '');
|
||||||
window.addEventListener('popstate', (evt) => {
|
window.addEventListener('popstate', (evt) => {
|
||||||
|
|
@ -128,6 +126,11 @@ class RenderScripture {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const url = new URL(document.URL);
|
||||||
|
if (url.searchParams.get("cite") !== null) {
|
||||||
|
history.replaceState({dialog: false}, '', '');
|
||||||
|
this.openDialog(url.searchParams.get("cite"), url.hash.substring(1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
anchorClick(evt) {
|
anchorClick(evt) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue