Commit 5e6765f0 authored by Eric Schewe's avatar Eric Schewe
Browse files

Removed Google Analytics code, removed ghost valut tracking, changed CSS

for buttons. Attempted to clean-up leftover code that wasn't needed
anymore because of the removed features.
parent e42820ac
<html>
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Phasmophobia Calculator</title>
<meta name="description" content="Determines which ghosts are left, based on the evidence you've already found." />
<meta name="keywords" content="Phasmophobia, Ghost, Calculator, Calc" />
......@@ -30,16 +33,17 @@
}
button
{
background-color: Transparent;
color: White;
background-repeat:no-repeat;
cursor:pointer;
overflow: hidden;
outline:none;
font-family: 'Arial';
font-size: 1em;
margin-right: 0.25em;
margin-bottom: 0.25em;
background-color:#000000;
border-radius:28px;
border:1px solid #ffffff;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:17px;
padding:16px 31px;
text-decoration:none;
text-shadow:0px 1px 0px #2f6627;
}
table, tr, td
{
......@@ -73,14 +77,6 @@
text-align: center;
}
</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-N04P1R3HHT"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-N04P1R3HHT');
</script>
<script>
var ghostArray =
[
......@@ -116,11 +112,6 @@
{
Evidence = "gf_" + ghostsLeft[0][0];
Evidence = Evidence.replace(" ", "_");
gtag('event', Evidence);
var num = getCookie(ghostsLeft[0][0]);
num++;
setCookie(ghostsLeft[0][0], num);
document.getElementById(ghostsLeft[0][0]).innerHTML = num;
}
for (i = 0; i < buttonArray.length; i++)
{
......@@ -131,50 +122,6 @@
document.getElementById("reset").innerHTML = "Reset Evidence";
ghostsLeft = JSON.parse(JSON.stringify(ghostArray));
};
function init()
{
var num;
for (var i = 0; i < ghostArray.length; i++)
{
num = getCookie(ghostArray[i][0]);
document.getElementById(ghostArray[i][0]).innerHTML = num;
}
};
function clearHistory()
{
for (var i = 0; i < ghostArray.length; i++)
{
document.cookie = ghostArray[i][0] + "=0;expires=0";
document.getElementById(ghostArray[i][0]).innerHTML = 0;
}
};
function getCookie(cname)
{
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for (var i = 0; i <ca.length; i++)
{
var c = ca[i];
while (c.charAt(0) == ' ')
{
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "0";
};
function setCookie(cname, cvalue)
{
document.cookie = cname + "=" + cvalue + ";" + "expires=2147483647";
};
function buttonClick(id)
{
buttonArray[id][0]++;
......@@ -196,7 +143,6 @@
var Evidence = "ev_" + buttonArray[id][1];
Evidence = Evidence.replace(" ", "_");
gtag('event', Evidence);
document.getElementById("Ghosts").innerHTML += "[debug] buttonArray[" + id + "] = " + buttonArray[id] + "<br/>";
......@@ -284,7 +230,7 @@
}
else
{
document.getElementById("reset").innerHTML = "Capture " + ghostsLeft[0][0];
document.getElementById("reset").innerHTML = "Reset Evidence";
}
outputList += "</tr>";
}
......@@ -295,7 +241,7 @@
};
</script>
</head>
<body onLoad="init();">
<body>
<div><button id="0" class="left" onClick="buttonClick(0)">EMF 5</button>
<button id="1" class="left" onClick="buttonClick(1)">Ghost Orbs</button>
<button id="2" class="left" onClick="buttonClick(2)">Ghost Writing</button>
......@@ -311,21 +257,5 @@
</p>
</div>
<div style="clear: both;"><button id="reset" onClick="buttonReset()">Reset Evidence</button></div>
<div class="name" style="clear: both; margin-top: 2.5em;">Ecto-Containment Unit:</div>
<div style="clear: both;">
<div class="history"><span id="Spirit" class="num">0</span><span class="name"><br/>Spirit</span></div>
<div class="history"><span id="Wraith" class="num">0</span><span class="name"><br/>Wraith</span></div>
<div class="history"><span id="Phantom" class="num">0</span><span class="name"><br/>Phantom</span></div>
<div class="history"><span id="Poltergeist" class="num">0</span><span class="name"><br/>Poltergeist</span></div>
<div class="history"><span id="Banshee" class="num">0</span><span class="name"><br/>Banshee</span></div>
<div class="history"><span id="Jinn" class="num">0</span><span class="name"><br/>Jinn</span></div>
<div class="history"><span id="Mare" class="num">0</span><span class="name"><br/>Mare</span></div>
<div class="history"><span id="Revenant" class="num">0</span><span class="name"><br/>Revenant</span></div>
<div class="history"><span id="Shade" class="num">0</span><span class="name"><br/>Shade</span></div>
<div class="history"><span id="Demon" class="num">0</span><span class="name"><br/>Demon</span></div>
<div class="history"><span id="Yurei" class="num">0</span><span class="name"><br/>Yurei</span></div>
<div class="history"><span id="Oni" class="num">0</span><span class="name"><br/>Oni</span></div>
</div>
<div style="clear: both;"><button class="name" style="margin-top: 0.5em;" onClick="clearHistory()">Release Ghosts</button></div>
</body>
</html>
</html>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment