const API_ENDPOINT = "https://gimb.tk/test.php"; const DIRECTORY_URL = "/directory.json"; // const API_ENDPOINT = "http://localhost:5000/test.php"; // "Global" object for name directory var directory = null; async function checkLogin() { localforage.getItem("logged_in").then(function (value) { // This code runs once the value has been loaded // from the offline store. if (value !== true) { window.location.replace("/index.html"); } }).catch(function (err) { // This code runs if there were any errors console.log(err); }); } // -----------HTML HELPERS----------- function htmlEncode(value) { // Create a in-memory element, set its inner text (which is automatically encoded) // Then grab the encoded contents back out. The element never exists on the DOM. return $("