Widget:GetAgencyInfo

 Loading agency information ... //var tmp = setTimeout(load_agency_info, 100); load_agency_info;

function load_agency_info { var aID = ""; var dNow = new Date; var cacheExp = localStorage.getItem("exp-"+aID); console.log("Comparing:"); console.log(dNow); console.log(cacheExp); if (cacheExp < dNow) { console.log("Cache expired or not found for Agency "+aID+ " (" + localStorage.getItem("exp-"+aID) + ")"); var xhttp = new XMLHttpRequest; xhttp.onreadystatechange = function { if (xhttp.readyState == 4 && xhttp.status == 200) { document.getElementById("agency_info").innerHTML = xhttp.responseText; var dUpdCache = new Date + (1000 * 60 * 2); //test w/ 2 min cache localStorage.setItem("exp-"+aID, dUpdCache); localStorage.setItem("ag-"+aID, xhttp.responseText); console.log("Saved cache for Agency "+aID); }		};		xhttp.open("POST", "https://foia.wiki/ext_data/agency_info.php", true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.send("id=&beta="); } else { //cache hasn't expired document.getElementById("agency_info").innerHTML = localStorage.getItem("ag-"+aID); console.log("Used cache for Agency "+aID); } } function fp_view_case(cid) { $("#hiddencase").html("close \n"); $("#hiddencase").load("https://foia.wiki/ext_data/fp_view_case.php", { id: cid }); $("#hiddencase").css({ display: "block", left: "15%", top:"20%", width:"70%", maxHeight:"60%" }); } function fp_close_preview { $("#hiddencase").css({ display: "none" }); $("#hiddencase").html("close "); } function storageAvailable { try { var storage = window[localStorage], x = '__storage_test__'; storage.setItem(x, x); storage.removeItem(x); return true; }	catch(e) { return false; } }  close