16 lines
400 B
JavaScript
16 lines
400 B
JavaScript
// document.addEventListener("DOMContentLoaded", () =>
|
|
// {
|
|
// fetch("isLoggedIn.php").then(res => res.json().then(json =>
|
|
// {
|
|
// if (json.message !== "ok")
|
|
// {
|
|
// window.location.href = "index.html";
|
|
// }
|
|
// else
|
|
// {
|
|
// document.querySelector("#title h1").innerText = "Logged in as: " + json.username;
|
|
// }
|
|
// }));
|
|
// });
|
|
|