// document.addEventListener("DOMContentLoaded", () => // { // fetch("isLoggedIn.php").then(res => res.json().then(json => // { // if (json.message !== "ok") // { // window.location.href = "index.html"; // } // })); // });