Main menu
This commit is contained in:
+6
-1
@@ -40,8 +40,13 @@ export class Connection {
|
||||
send(message: ClientMessage) {
|
||||
this.#server.send(message);
|
||||
}
|
||||
|
||||
close() {
|
||||
this.#server.close();
|
||||
}
|
||||
}
|
||||
|
||||
export function get_player_name(): string {
|
||||
// what the name field starts as, from ?name=
|
||||
export function default_player_name(): string {
|
||||
return new URLSearchParams(location.search).get("name") ?? "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user