add localstorage.host option

This commit is contained in:
Soph :3 2024-11-25 20:38:46 +02:00
parent afcd1f2778
commit c1155ef3e7
Signed by: sophie
GPG key ID: EDA5D222A0C270F2
3 changed files with 4 additions and 1 deletions

View file

@ -6,5 +6,7 @@ if(!localStorage.host) {
wsurl = "wss://pianoverse.net"
} else if(localStorage.host == "dev") {
wsurl = "ws://127.0.0.1:8081"
} else {
wsurl = localStorage.host;
};
this._ws = new WebSocket(wsurl,"pianoverse")

File diff suppressed because one or more lines are too long

View file

@ -13,6 +13,7 @@ This client contains two patches, internal.patch, and ws.patch.
| | api.pianoverse.me |
| mainline | pianoverse.net |
| dev | 127.0.0.1:8081 |
| anything else | localStorage.host |
2. internal.patch
Exposes all internal pianoverse APIs on window.PvInternals.