Skip to content

Commit

Permalink
Tooling: Preact Client server by URL; tslint (smogon#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviettran authored Jan 20, 2021
1 parent 1693ccf commit 1d9fadd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"editor.formatOnSave": false,
"showdown.server": "", // e.g., "?~~localhost:8000"
"showdown.clientUrl": "http://localhost:8080"
"showdown.clientUrl": "http://localhost:8080",
"tslint.configFile": "tslint.json"
}
17 changes: 17 additions & 0 deletions testclient-beta.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ <h3><button class="closebutton" tabindex="-1" aria-label="Close"><i class="fa fa
linkStyle("style/font-awesome.css");
</script>
<script src="https://play.pokemonshowdown.com/config/config.js"></script>
<script>
Config.testclient = true;
(function() {
if (location.search !== '') {
var m = /\?~~(([^:\/]*)(:[0-9]*)?)/.exec(location.search);
if (m) {
Config.defaultserver = {
id: m[1],
host: m[2],
port: (m[3] && parseInt(m[3].substr(1))) || 8000
};
} else {
alert('Unrecognised query string syntax: ' + location.search);
}
}
})();
</script>
<script src="config/testclient-key.js"></script>
<script src="js/client-core.js"></script>
<script nomodule src="/js/lib/ps-polyfill.js"></script>
Expand Down

0 comments on commit 1d9fadd

Please sign in to comment.