Open dialog when receiving an appropriate URI query string.

This commit is contained in:
Benjamin A. Shelton 2026-08-20 15:01:36 -06:00
commit 614961b220
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -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) {