Preview link

This commit is contained in:
2025-09-01 14:37:31 +00:00
parent debbf07280
commit 021e0c7974
8 changed files with 45 additions and 4 deletions

View File

@ -92,6 +92,18 @@ document.addEventListener("DOMContentLoaded", () => {
});
}
// Preview Site button
const previewBtn = document.getElementById("preview-site-btn");
if (previewBtn) {
const previewPort = previewBtn.getAttribute("data-preview-port") || "3000";
previewBtn.onclick = () => {
const host = window.location.hostname;
const protocol = window.location.protocol;
const url = `${protocol}//${host}:${previewPort}/`;
window.open(url, "_blank");
};
}
// Modal close logic
if (buildModal && buildModalClose) {
buildModalClose.onclick = () => {