feat(model): open model with param using id key on url

This commit is contained in:
Admin 2026-06-12 15:41:50 +07:00
parent 48876ab3ad
commit 3c16b588e1
1 changed files with 14 additions and 0 deletions

View File

@ -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();
})();
})();