-
Notifications
You must be signed in to change notification settings - Fork 4
/
race.html
101 lines (98 loc) · 5.83 KB
/
race.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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
<html>
<head>
<title>TPP Progress Chart</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.7.0/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.0/react-dom.min.js"></script>
<script src="transforms/tpp-transforms.js"></script>
<script src="bin/tpp-structure.js"></script>
<script src="bin/twitch-videos.js"></script>
<script src="bin/tpp-progress.js"></script>
<script src="bin/tpp-scraper.js"></script>
<script src="bin/tpp-data.js"></script>
<script src="display/tpp-display.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="css/tpp-progress.css" />
<link rel="stylesheet" href="css/pokemon.css" />
<link rel="icon" href="img/icon.png" type="image/png">
<link rel="shortcut icon" href="img/icon.png" type="image/png">
<meta property="og:title" content="TPP Progress Chart" />
<meta property="og:url" content="http://thatswhatyouget.github.io/tpp-progress/" />
<meta property="og:image" content="http://thatswhatyouget.github.io/tpp-progress/img/icon.png" />
<meta property="og:type" content="website" />
<meta charset="utf-8" />
</head>
<body>
<div class="title">
<h1>Twitch Plays Pokemon</h1>
<div class="subtitle">
<span class="Region" style="text-transform:capitalize;">Region</span> Race
<a href="index.html">See Full Progress Chart</a>
</div>
</div>
<div class="title">
<strong>Progress Chart</strong>
<div class="credits">
<span>Original Design: <a href="https://www.reddit.com/user/jim_needs_me" target="_blank">jim_needs_me</a></span>
<span>Interactive version: <a href="https://www.reddit.com/user/VorpalNorman" target="_blank">VorpalNorman</a></span>
</div>
<div class="credits">
Contributors:
<a href="https://www.reddit.com/user/TheSwordUser" target="_blank">TheSwordUser</a>,
<a href="https://www.reddit.com/user/UDie2day" target="_blank">UDie2day</a>,
<a href="https://www.reddit.com/user/AsterJ" target="_blank">AsterJ,</a>
<a href="https://www.reddit.com/user/Rabbeseking" target="_blank">Rabbeseking</a>,
<a href="https://www.reddit.com/user/Tiesoul" target="_blank">Tiesoul</a>,
<a href="https://www.reddit.com/user/Persona_Alio" target="_blank">valence_d</a>,
<a href="https://www.reddit.com/user/ChezMere" target="_blank">ChezMere</a>,
<a href="https://www.reddit.com/user/T-chan" target="_blank">T-chan</a>,
<a href="https://www.reddit.com/user/yoshord" target="_blank">yoshord</a>,
and <a href="https://www.reddit.com/user/Sauzels" target="_blank">Sauzels</a>
</div>
<div class="credits">
Default sprites are from <a href="http://bulbapedia.bulbagarden.net/" target="_blank">Bulbapedia</a> and <a href="http://twitchplayspokemon.org/" target="_blank">twitchplayspokemon.org</a>.
Pokemon sprites are from <a href="http://pldh.net/dex/sprites/index" target="_blank">PLDHnet's SpriteDex</a>.<br/>
All custom sprites can be clicked for links to their sources.
</div>
<div class="credits">
<span class="doItLive">Most</span> run data provided by <a href="http://twitchplayspokemon.org/" target="_blank">twitchplayspokemon.org</a>.
</div>
</div>
<div class="charts">
<script>
var day = Math.floor(QueryString.day || 0);
var pure = !!QueryString.pure;
var region = QueryString.region || "Kanto", reeg = region.toLowerCase();
var startedHere = QueryString.startedhere;
var data = Array.prototype.concat.apply([], tppData.map(function (c) {
var newC = { Scale: day ? c.Scale == TPP.Scale.Weeks ? c.Scale : TPP.Scale.Days : c.Scale, Name: c.Name, SingularName: c.SingularName, Offset: c.Offset};
newC.Offset = day ? -(day - 1) : day;
newC.Runs = c.Runs.map(function (r) {
if (!r.AdditionalRegions) return r;
var newR = {};
Object.keys(r).forEach(function(k) { newR[k] = r[k]; });
newR.EndDate = newR.Duration = r.AdditionalRegions[0].Time;
return newR;
}).filter(function (r) { return !r.Revisit && r.Region && r.Region.toLowerCase().trim() == reeg && Duration.parse(r.Duration, r.StartTime).TotalDays > (day - 1); });
return Array.prototype.concat.apply([newC], pure ? [] : Array.prototype.concat.apply([], c.Runs.map(function(r) {
return (r.AdditionalRegions || []).map(function (ar, i, ararray) {
if (startedHere || ar.Name.toLowerCase() != reeg) return;
var nc = { Scale: newC.Scale, Name: r.RunName + " (Starting at " + Duration.parse(ar.Time, r.StartTime).toString(newC.Scale) + ")", SingularName: c.SingularName, Offset: newC.Offset - Duration.parse(ar.Time, r.StartTime).TotalTime(newC.Scale)};
var newR = {};
Object.keys(r).forEach(function(k) { newR[k] = r[k]; });
if (ararray.length > (i + 1)) newR.EndDate = newR.Duration = ararray[i + 1].Time;
nc.Runs = [newR];
return nc;
}).filter(function(r) { return r; });
}).filter(function(r) { return r; })));
})).filter(function (c) { return c.Runs.length; });
if (day) globalPpd = 1024;
$('span.region').text(region);
createCharts(data);
</script>
</div>
<ul class="controls">
<script>drawControls(defaultControls(dayMenu(data), regionMenu(tppData)));</script>
</ul>
</body>
</html>