mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-09 20:38:45 -05:00
Support configurable URLs (#1543)
This commit is contained in:
@@ -12,13 +12,14 @@
|
||||
<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>
|
||||
function loadRemoteData(src) {
|
||||
var scriptEl = document.createElement('script');
|
||||
scriptEl.src = src.replace(/.*\/?data\//g, 'https://play.pokemonshowdown.com/data/');
|
||||
document.head.appendChild(scriptEl);
|
||||
}
|
||||
var Config = {testclient: true};
|
||||
Config.testclient = true;
|
||||
(function() {
|
||||
if (location.search !== '') {
|
||||
var m = /\?~~(([^:\/]*)(:[0-9]*)?)/.exec(location.search);
|
||||
@@ -85,7 +86,6 @@
|
||||
window.exports = window;
|
||||
</script>
|
||||
|
||||
<script src="https://play.pokemonshowdown.com/config/config.js"></script>
|
||||
<script src="js/battledata.js" onerror="alert('You must build the client with `node build` before using testclient.html')"></script>
|
||||
<script src="data/pokedex-mini.js" onerror="loadRemoteData(this.src)"></script>
|
||||
<script src="data/pokedex-mini-bw.js" onerror="loadRemoteData(this.src)"></script>
|
||||
|
||||
Reference in New Issue
Block a user