lnr/Originals/Website/ticker.html
2021-04-15 17:26:34 -07:00

81 lines
2.7 KiB
HTML
Executable File

<html>
<head>
<title>LNR Universe Ticker</title>
<link rel="StyleSheet" type="text/css" href="script/styles.css">
</head>
<body bgcolor="black" link="white" vlink="white" alink="white" text="white"
marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"
background="images/stars.jpg">
<font face="Verdana,Arial" size="2" color="white">
<script>
var caution = false
// name - name of the cookie
// value - value of the cookie
// [expires] - expiration date of the cookie (defaults to end of current session)
// [path] - path for which the cookie is valid (defaults to path of calling document)
// [domain] - domain for which the cookie is valid (defaults to domain of calling document)
// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "")
if (!caution || (name + "=" + escape(value)).length <= 4000)
document.cookie = curCookie
else
if (confirm("Cookie exceeds 4KB and will be cut!"))
document.cookie = curCookie
}
// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
function getCookie(name) {
var prefix = name + "="
var cookieStartIndex = document.cookie.indexOf(prefix)
if (cookieStartIndex == -1)
return null
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
if (cookieEndIndex == -1)
cookieEndIndex = document.cookie.length
return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}
function deleteCookie(name, path, domain) {
if (getCookie(name)) {
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT"
}
}
function fixDate(date) {
var base = new Date(0)
var skew = base.getTime()
if (skew > 0)
date.setTime(date.getTime() - skew)
}
// UPDATED 2019-04-30: use localStorage instead of bad cookie logic above.
var now = new Date()
fixDate(now)
now.setTime(now.getTime() + 31 * 24 * 60 * 60 * 1000)
var name = localStorage["lnr.name"];
if (""+name === "undefined") {
name = prompt("Welcome to LNR Universe. Please sign in. What is your name?", "Synan Creel")
localStorage["lnr.name"] = name;
}
document.write("Welcome to The Land of No Return, " + name + "!")
</script>
<br>&nbsp;
</font>
</body>
</html>