diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a88115149..ca8fddc27 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,7 +4,10 @@ { "type": "npm", "script": "build", - "group": "build", + "group": { + "kind": "build", + "isDefault": true + }, "problemMatcher": [], "label": "npm: build", "detail": "node build" diff --git a/play.pokemonshowdown.com/preactalpha.template.html b/play.pokemonshowdown.com/preactalpha.template.html index 74a06014d..2f4b91b54 100644 --- a/play.pokemonshowdown.com/preactalpha.template.html +++ b/play.pokemonshowdown.com/preactalpha.template.html @@ -55,6 +55,7 @@ + @@ -81,7 +82,6 @@ - diff --git a/play.pokemonshowdown.com/src/client-connection.ts b/play.pokemonshowdown.com/src/client-connection.ts index 9bda6f874..cd951fb20 100644 --- a/play.pokemonshowdown.com/src/client-connection.ts +++ b/play.pokemonshowdown.com/src/client-connection.ts @@ -162,9 +162,13 @@ class NetRequest { } export function Net(uri: string) { + if (uri.startsWith('/') && !uri.startsWith('//') && Net.defaultRoute) uri = Net.defaultRoute + uri; + if (uri.startsWith('//') && document.location.protocol === 'file:') uri = 'https:' + uri; return new NetRequest(uri); } +Net.defaultRoute = ''; + Net.encodeQuery = function (data: string | PostData) { if (typeof data === 'string') return data; let urlencodedData = ''; diff --git a/play.pokemonshowdown.com/style/client2.css b/play.pokemonshowdown.com/style/client2.css index b116d854e..2dde43b75 100644 --- a/play.pokemonshowdown.com/style/client2.css +++ b/play.pokemonshowdown.com/style/client2.css @@ -1359,7 +1359,7 @@ a.ilink.yours { -webkit-overflow-scrolling: touch; overflow-scrolling: touch; } -.userlist-count { +.userlist-count, .userlist .userlist-count { text-align: center; padding: 2px 0; } diff --git a/play.pokemonshowdown.com/testclient-beta.html b/play.pokemonshowdown.com/testclient-beta.html index 11b3b5979..fa022f6b1 100644 --- a/play.pokemonshowdown.com/testclient-beta.html +++ b/play.pokemonshowdown.com/testclient-beta.html @@ -97,11 +97,13 @@ + + @@ -124,7 +126,6 @@ -