if (location.protocol === "http:" && !(location.host.startsWith("localhost"))) { location.protocol = "https:"; } var php_enabled = false; var uptime = false; /**/var php_enabled = true;var uptime = 754840.52/**/ var text = "%s of uptime"; var start = new Date() / 1000; start -= uptime; var whoami_text = "i'm spv, a %s-year-old developer, hacker, security researcher, video editor, and music producer from the east coast of the united states"; var birthday = new Date('2007-05-11 EDT'); var mxhr = new XMLHttpRequest(); var motds = ["embrace the chaos", "legalize and regualte", "i'm already in hell", "taglines taglines taglines"]; window.onload = function(){ if (uptime === false) { document.getElementById("countup").style = "display: none"; } else { document.getElementById("countup").style = "display: block"; } function differenceToString(n, round_to) { var s = ""; var n_ = n; var hours = (Math.round(n_ / 3600 * Math.pow(10, round_to)) / Math.pow(10, round_to)); var hours_str = hours.toFixed(3); s += "" + hours_str + " hours"; return s; } function countup_interval() { var REPLACETHIS = document.getElementById("countup_text"); var now = new Date() / 1000; var s = text.replace("%s", differenceToString(now - start, 3)); REPLACETHIS.innerText = s; } /* function whoami_interval() { var REPLACETHIS = document.getElementById("whoami_text"); var now = new Date(); var age = Math.abs(new Date(now - birthday).getUTCFullYear() - 1970); var s = whoami_text.replace("%s", age.toString()); REPLACETHIS.innerText = s; }*/ countup_interval(); // setInterval(whoami_interval, 500); setInterval(countup_interval, 500); }