index.html 7.48 KB
Newer Older
Eric Schewe's avatar
Eric Schewe committed
1
<!DOCTYPE html>
Eric Schewe's avatar
Eric Schewe committed
2
<html lang="en">
3
	<head>
4
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
		<title>Phasmophobia Evidence Eliminator</title>
6
		<meta name="description" content="Determines which ghosts are left, based on the evidence you've already found." />
7
		<meta name="keywords" content="Phasmophobia, Ghost, Calculator, Calc, Evidence, Eliminator" />
8
		<meta name="viewport" content="width=device-width, initial-scale=1">
9
		<link rel="icon" href="favicon.png">
10
		<style>
11
12
            html *
            {
13
				font-family: 'Courier' !important;
14
				font-weight: 600;
15
16
				background-color: black;
				color: white;
17
            }
18
19
20
			p
			{
				color: white;
Eric Schewe's avatar
Eric Schewe committed
21
				font-size: 18px;
22
23
24
25
				clear: both;
			}
			button
			{
26
27
                background-color:#000000;
                border-radius:28px;
28
                border:2px solid #ffffff;
29
30
31
                display:inline-block;
                cursor:pointer;
                color:#ffffff;
32
                font-size:24px;
33
                padding:10px 15px;
34
                text-decoration:none;
35
36
37
38
			}
			#reset
			{
                background-color:#8B0000;
39
40
41
			}
			table, tr, td
			{
Eric Schewe's avatar
Eric Schewe committed
42
43
				border-spacing: 0em;
				padding: 0em;
44
45
46
47
48
49
50
51
52
53
54
				border: none;
			}
			.name
			{
				color: darkgray;
				font-size: 0.75em;
			}
			.left
			{
				float: left;
			}
Eric Schewe's avatar
Eric Schewe committed
55
56
57
58
59
60
61
62
63
64
65
66
            /* unvisited link */
            a:link {
            color: red;
            }
            /* visited link */
            a:visited {
            color: darkred;
            }
            /* mouse over link */
            a:hover {
            color: darkred;
            }
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
		</style>
		<script>
			var ghostArray =
			[
				["Spirit", 2, 4, 5],
				["Wraith", 3, 4, 5],
				["Phantom", 0, 1, 3],
				["Poltergeist", 1, 4, 5],
				["Banshee", 0, 3, 5],
				["Jinn", 0, 1, 4],
				["Mare", 1, 3, 4],
				["Revenant", 0, 2, 5],
				["Shade", 0, 1, 2],
				["Demon", 2, 3, 4],
				["Yurei", 1, 2, 3],
				["Oni", 0, 2, 4]
			];
			
			var buttonArray =
			[
				[0, "EMF 5"],			// 0
				[0, "Ghost Orbs"],		// 1
				[0, "Ghost Writing"],	// 2
				[0, "Freezing Temps"],	// 3
				[0, "Spirit Box"],		// 4
				[0, "Finger Prints"]	// 5
			];

			var ghostsLeft;
			
			function buttonReset(id)
			{
				if (ghostsLeft.length == 1)
				{
					Evidence = "gf_" + ghostsLeft[0][0];
					Evidence = Evidence.replace(" ", "_");
				}
				for (i = 0; i < buttonArray.length; i++)
				{
					buttonArray[i][0] = 0;
107
                    document.getElementById(i).style.background='#000000';
108
				}
109
110
                document.getElementById("Ghosts").innerHTML = "<br/>Please select evidence<br/><br/>Black = Not found<br/>Green = Found evidence";
				document.getElementById("reset").innerHTML = "Reset";
111
112
113
114
115
				ghostsLeft = JSON.parse(JSON.stringify(ghostArray));
			};
			function buttonClick(id)
			{
				buttonArray[id][0]++;
116
				if (buttonArray[id][0] == 0 || buttonArray[id][0] > 1)
117
118
119
120
121
122
				{
					buttonArray[id][0] = 0;
					document.getElementById(id).style.background='#000000';
				}
				else
				{
123
					document.getElementById(id).style.background='#045e04';
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
				}

				var Evidence = "ev_" + buttonArray[id][1];
				Evidence = Evidence.replace(" ", "_");
				
				ghostsLeft = JSON.parse(JSON.stringify(ghostArray));
				
				var i;
				for (i = 0; i < buttonArray.length; i++)
				{
					for (var j = ghostsLeft.length - 1; j >= 0 ; j--)
					{
						if (buttonArray[i][0] == 1 && ghostsLeft[j][1] != i && ghostsLeft[j][2] != i && ghostsLeft[j][3] != i)
						{
							// Ghost does not contain a needed evidence.  Remove it!
							ghostsLeft.splice(j,1);
						}
						else if (buttonArray[i][0] == 2 && (ghostsLeft[j][1] == i || ghostsLeft[j][2] == i || ghostsLeft[j][3] == i))
						{
							ghostsLeft.splice(j,1);
						}
						else
						{
							if (buttonArray[i][0] == 1 && ghostsLeft[j][1] == i) { ghostsLeft[j][1] = -1; }
							if (buttonArray[i][0] == 1 && ghostsLeft[j][2] == i) { ghostsLeft[j][2] = -1; }
							if (buttonArray[i][0] == 1 && ghostsLeft[j][3] == i) { ghostsLeft[j][3] = -1; }
						}
					}
				}
Eric Schewe's avatar
Eric Schewe committed
153

154
155
				if (ghostsLeft.length == ghostArray.length)
				{
156
157
					document.getElementById("Ghosts").innerHTML = "<br/>Please select evidence<br/><br/>Black = Unknown<br/>Green = I found this evidence";
					document.getElementById("reset").innerHTML = "Reset";
158
159
160
161
162
163
164

				}
				else
				{
					var outputList = "";
					var needComma;
				
165
					outputList += "<br/><table><tr><td><u>Remaining:</u><br/><br/></td><td></td></tr>";
166
167
168
					if (ghostsLeft.length == 0)
					{
						outputList += "<tr><td>No ghosts found</td><td></td></tr>";
169
						document.getElementById("reset").innerHTML = "Reset";
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
					}
					else
					{
						for (var k = 0; k < ghostsLeft.length; k++)
						{
							outputList += "<tr><td>" + ghostsLeft[k][0] + "</td>";
							if (ghostsLeft.length > 1)
							{
								needComma = false;
								outputList += "<td><span style=\"color: darkgray;\"> (";
								if (ghostsLeft[k][1] >= 0 )
								{
									outputList += buttonArray[ghostsLeft[k][1]][1];
									needComma = true;
								}
								if (ghostsLeft[k][2] >= 0 )
								{
									if (needComma == true) { outputList += ", "; }
									outputList += buttonArray[ghostsLeft[k][2]][1];
									needComma = true;
								}
								if (ghostsLeft[k][3] >= 0 )
								{
									if (needComma == true) { outputList += ", "; }
									outputList += buttonArray[ghostsLeft[k][3]][1];
								}
								outputList += ")</span></td>";
197
								document.getElementById("reset").innerHTML = "Reset";
198
199
200
							}
							else
							{
201
								document.getElementById("reset").innerHTML = "Reset";
202
203
204
205
206
207
208
209
210
							}
							outputList += "</tr>";
						}
					}
					outputList += "</table>";
					document.getElementById("Ghosts").innerHTML = outputList;
				}
			};
		</script>
211
		<!-- Matomo -->
212
		<script>
213
214
215
216
217
218
219
220
221
222
223
224
225
			var _paq = window._paq = window._paq || [];
			/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
			_paq.push(['trackPageView']);
			_paq.push(['enableLinkTracking']);
			(function() {
			var u="https://stats.pickysysadmin.ca/";
			_paq.push(['setTrackerUrl', u+'matomo.php']);
			_paq.push(['setSiteId', '9']);
			var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
			g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
			})();
		</script>
		<!-- End Matomo Code -->
226
	</head>
227
	<body>
228
229
230
231
232
233
234
235
		<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>
			<button id="3" class="left" onClick="buttonClick(3)">Freezing Temps</button>
			<button id="4" class="left" onClick="buttonClick(4)">Spirit Box</button>
			<button id="5" class="left" onClick="buttonClick(5)">Finger Prints</button>
		</div>
236
237
		<div>
			<p id="Ghosts">
238
				<br/>Please select evidence<br/><br/>
239
240
				Black = Not found<br/>
				Green = Found evidence
241
242
			</p>
		</div>
243
244
245
		<div style="clear: both;">
			<br/><button id="reset" onClick="buttonReset()">Reset</button>
		</div>
Eric Schewe's avatar
Eric Schewe committed
246
		<br/>
Eric Schewe's avatar
Eric Schewe committed
247
248
		<div style="clear: both;">
			<p>
249
				With permission, edited from <a href="https://PhasmoCalc.com">PhasmoCalc.com</a> | <a href="https://git.pickysysadmin.ca/FiZi/phasmophobia-evidence-eliminator">Source code</a> | <a href="privacy.html">Privacy policy</a>
Eric Schewe's avatar
Eric Schewe committed
250
251
			</p>
		</div>
252
253
254
		<!-- Matomo Image Tracker-->
		<noscript><img referrerpolicy="no-referrer-when-downgrade" src="https://stats.pickysysadmin.ca/matomo.php?idsite=9&amp;rec=1" style="border:0" alt="" /></noscript>
		<!-- End Matomo -->
255
	</body>
256
</html>