Özgün çalışan dosya
public/app.js
Kodlardaki adlar ve çalışan örnek sayfalardaki metinler özgün halleriyle korunmuştur. Ders ve dosya açıklamaları bunları Türkçe olarak açıklar.
import { BOOKING_URL } from "./config.js";
const a = document.querySelector("#booking"),
status = document.querySelector("[role=status]");
try {
const u = new URL(BOOKING_URL);
if (
u.protocol !== "https:" ||
u.hostname !== "calendly.com" ||
u.pathname.includes("YOUR-")
)
throw Error();
a.href = u.href;
a.hidden = false;
status.textContent =
"Booking opens on Calendly. Check the time zone before confirming.";
} catch {
status.textContent = "Set your own public event link in config.js first.";
}