forked from smogon/pokemon-showdown-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestclient.html
222 lines (203 loc) · 10.7 KB
/
testclient.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html>
<!--
/ \
/ /\ \ tildearrow
\ \/ / hope is with us.
\ /
========= presents =========
P o k é m o n !
/- H O W D O W N !
-/ Sound Fix! .
...once upon a time, in a prestigious hut, Zarel uttered...
"The main complicated thing we do with sound is loop music with an intro.
This is unfortunately not supported by ANY sound library out there
(I had to manually add support for it myself to soundManager!)"
"In the end, I don't think the existing libraries out there actually
give us anything I care about."
...a faint echo arrived to the other side...
the voice was heard... and tildearrow raised his hand...
..."hold my Asuka!"
tildearrow proceeded to harness the power of WebAssembly to prepare
the ultimate solution to this problem...
...and then... it was done!
- https://github.com/tildearrow/pokemon-showdown-client
-->
<html>
<head>
<meta charset="UTF-8" />
<meta id="viewport" name="viewport" content="width=device-width" />
<title>Shipdown!</title>
<link rel="shortcut icon" href="favicon.ico" id="dynamic-favicon" />
<link rel="stylesheet" href="style/battle.css" />
<link rel="stylesheet" href="style/client.css" />
<link rel="stylesheet" href="style/sim-types.css" />
<link rel="stylesheet" href="style/utilichart.css" />
<link rel="stylesheet" href="style/font-awesome.css" />
<meta name="robots" content="noindex" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<script src="https://play.pokemonshowdown.com/config/config.js"></script>
<script src="config/audio.js"></script>
<script>
function loadRemoteData(src) {
var scriptEl = document.createElement('script');
scriptEl.src = src.replace(/.*\/?data\//g, 'https://play.pokemonshowdown.com/data/');
document.head.appendChild(scriptEl);
}
Config.testclient = true;
(function() {
if (location.search !== '') {
var m = /\?~~(([^:\/]*)(:[0-9]*)?)/.exec(location.search);
if (m) {
Config.server = {
id: m[1],
host: m[2],
port: (m[3] && parseInt(m[3].substr(1))) || 8000
};
} else {
alert('Unrecognised query string syntax: ' + location.search);
}
}
})();
</script>
<!--[if lte IE 8]><script>
Config.oldie = true;
</script><![endif]-->
</head>
<body>
<div id="header" class="header">
<img class="logo" src="pokemonshowdownbeta.png" alt="Pokémon Showdown! (beta)" width="146" height="44" /><div class="maintabbarbottom"></div>
</div>
<div class="ps-room scrollable" id="mainmenu"><div class="mainmenuwrapper">
<div class="leftmenu">
<div class="activitymenu">
<div class="pmbox">
<div class="pm-window news-embed">
<h3><button class="closebutton" tabindex="-1" aria-label="Close"><i class="fa fa-times-circle"></i></button><button class="minimizebutton" tabindex="-1" aria-label="Minimize"><i class="fa fa-minus-circle"></i></button>Latest News</h3>
<div class="pm-log" style="max-height:none">
<div class="newsentry"><h4>Absolutely nothing</h4>nothing to say.</p><p>—<strong>tildearrow</strong> <small class="date">on Jan 28, 2023</small></p></div>
<div class="newsentry"><h4>Asuka sound engine!</h4>hereby I would like to announce that this instance has now been ported to use the new in-house Asuka sound engine!<br/>this should completely eliminate gaps in music playback (that even Gapless-5 couldn't deal with), fix sound issues on Safari (well, kind of), and act as a proof-of-concept for the following:<br/><br/><i>The main complicated thing we do with sound is loop music with an intro.<br/>
This is unfortunately not supported by ANY sound library out there<br/>
(I had to manually add support for it myself to soundManager!)<br/><br/>
In the end, I don't think the existing libraries out there actually give us anything I care about.</i></p><p>—<strong>tildearrow</strong> <small class="date">on Oct 26, 2020</small></p></div>
<div class="newsentry"><h4>Safari work</h4>as of now this instance fully supports Safari. some bugs left to iron out, but it is mostly ready.</p><p>—<strong>tildearrow</strong> <small class="date">on Jun 28, 2020</small></p></div>
</div>
</div>
</div>
</div>
<div class="mainmenu">
<div id="loading-message" class="mainmessage">Initializing... <noscript>FAILED<br /><br />Pokémon Showdown requires JavaScript.</noscript></div>
</div>
</div>
<div class="rightmenu">
</div>
<div class="mainmenufooter">
<small><a href="//pokemonshowdown.com/" target="_blank"><strong>Pokémon Showdown</strong></a> | <a href="//play.pokemonshowdown.com/" target="_blank"><strong>Actual Game</strong></a> | <a href="http://smogon.com/" target="_blank"><strong>Smogon</strong></a><br><a href="//pokemonshowdown.com/dex/" target="_blank">Pokédex</a> | <a href="//pokemonshowdown.com/replay/" target="_blank">Replays</a> | <a href="//pokemonshowdown.com/rules" target="_blank">Rules</a></small> | <small><a href="//pokemonshowdown.com/forums/" target="_blank">Forum</a></small>
</div>
</div></div>
<script>
var weCanLoad=false;
if (window.navigator.userAgent.indexOf('MSIE')>0) {
document.getElementById('loading-message').innerHTML += 'FAILED<br /><br />Pokémon Showdown does not support Internet Explorer.';
document.execCommand('Stop');
}
if (window.navigator.userAgent.indexOf('Trident/')>0) {
document.getElementById('loading-message').innerHTML += 'FAILED<br /><br />Pokémon Showdown does not support Internet Explorer.';
document.execCommand('Stop');
}
if (!window.WebAssembly) {
document.getElementById('loading-message').innerHTML += 'FAILED<br /><br />Pokémon Showdown requires WebAssembly for the sound engine.';
window.stop();
} else {
document.getElementById('loading-message').innerHTML += ' DONE<br />Loading libraries...';
}
</script>
<script nomodule src="/js/lib/ps-polyfill.js"></script>
<script src="js/lib/jquery-2.1.4.min.js"></script>
<script src="js/lib/jquery-cookie.js"></script>
<script src="js/lib/autoresize.jquery.min.js"></script>
<script>
document.getElementById('loading-message').innerHTML += ' DONE<br />Loading sound...';
!function(e, t){
console.log("Loading client...");
var n = "js/lib/asuka.js";
console.log("Script set to " + n);
var o = t.createElement("script");
o.async = !0, o.type = "text/javascript", o.src = n, o.onerror = function(t) {
console.error("Script Error"), console.error(t), setTimeout(function() {
document.getElementById('loading-message').innerHTML += ' FAILUREEEEEE'
}, 3e3)
};
var r = t.getElementsByTagName("script")[0];
r.parentNode.insertBefore(o, r)
}(window, document);
var Asuka = {
onRuntimeInitialized: function() {
console.log("sound is up");
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
Asuka.setBufSize(2048);
}
if (!weCanLoad) {
document.getElementById('loading-message').innerHTML += ' DONE<br />Still loading stuff...';
weCanLoad=true;
} else {
window.app = new App();
}
}
}
</script>
<script src="js/battle-sound.js"></script>
<script src="config/testclient-key.js"></script>
<script src="js/lib/html-css-sanitizer-minified.js"></script>
<script src="js/lib/lodash.core.js"></script>
<script src="js/lib/backbone.js"></script>
<script src="js/lib/d3.v3.min.js"></script>
<script>
document.getElementById('loading-message').innerHTML += ' DONE<br />Loading data...';
window.exports = window;
</script>
<!-- fallback for if you've never done a full build -->
<script src="js/server/chat-formatter.js" onerror="loadRemoteData(this.src)"></script>
<script src="js/battledata.js" onerror="alert('You must build the client with `node build` before using testclient.html')"></script>
<script src="data/text.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/pokedex-mini.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/pokedex-mini-bw.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/typechart.js" onerror="loadRemoteData(this.src)"></script>
<script src="js/battle.js"></script>
<script src="js/lib/sockjs-1.4.0-nwjsfix.min.js"></script>
<script src="js/lib/color-thief.min.js"></script>
<script>
document.getElementById('loading-message').innerHTML += ' DONE<br />Loading client...';
</script>
<script src="js/client.js"></script>
<script src="js/client-topbar.js"></script>
<script src="js/client-mainmenu.js"></script>
<script src="js/client-teambuilder.js"></script>
<script src="js/client-ladder.js"></script>
<script src="js/client-chat.js"></script>
<script src="js/client-chat-tournament.js"></script>
<script src="js/battle-tooltips.js"></script>
<script src="js/client-battle.js"></script>
<script src="js/client-rooms.js"></script>
<script src="js/storage.js"></script>
<script src="data/graphics.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/pokedex.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/moves.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/items.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/abilities.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/search-index.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/teambuilder-tables.js" onerror="loadRemoteData(this.src)"></script>
<script src="js/battle-dex-search.js"></script>
<script src="js/search.js"></script>
<script src="data/aliases.js" async="async" onerror="loadRemoteData(this.src)"></script>
<script>
window.onload = () => {
if (!weCanLoad) {
document.getElementById('loading-message').innerHTML += ' DONE<br />Still loading sound...';
weCanLoad=true;
} else {
window.app = new App();
}
}
</script>
</body>
</html>