feat(model): open model with param using id key on url
This commit is contained in:
parent
48876ab3ad
commit
3c16b588e1
|
|
@ -685,4 +685,18 @@
|
|||
}
|
||||
window.openValuationModal(email);
|
||||
};
|
||||
|
||||
// ── Auto-open a modal from the URL (e.g. ?_open=wc-quote-modal) ──
|
||||
(function openModalFromUrl() {
|
||||
const target = new URLSearchParams(window.location.search).get("_open");
|
||||
if (!target) return;
|
||||
|
||||
if (target === "store-modal-overlay") {
|
||||
window.openStoreModal();
|
||||
return;
|
||||
}
|
||||
|
||||
const el = document.getElementById(target);
|
||||
if (el && typeof el.open === "function") el.open();
|
||||
})();
|
||||
})();
|
||||
|
|
|
|||
Loading…
Reference in New Issue