diff --git a/src/utils/modal.js b/src/utils/modal.js index 5c0fafd..b0d5f77 100644 --- a/src/utils/modal.js +++ b/src/utils/modal.js @@ -79,8 +79,6 @@ class RenderScripture { constructor(dialog) { this.dialog = dialog; - const url = new URL(document.URL); - console.log(parseRef(url.searchParams.get('cite'))); //history.replaceState({dialog: false}, ''); 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) {