Start maybe working on a native app
This commit is contained in:
+2
-1
@@ -5,6 +5,7 @@ import { ClientMessage, EntityInfo, MenuSlotInfo, PlayerInfo, ServerMessage } fr
|
||||
import type { ModListing } from "@/common/mod_loader.ts";
|
||||
import { WorldShape } from "@/common/world_shape.ts";
|
||||
import type { Join, ServerSocket, Welcome } from "./handshake.ts";
|
||||
import { platform } from "./platform.ts";
|
||||
|
||||
export class Connection {
|
||||
#server: ServerSocket;
|
||||
@@ -59,5 +60,5 @@ export class Connection {
|
||||
|
||||
// what the name field starts as, from ?name=
|
||||
export function default_player_name(): string {
|
||||
return new URLSearchParams(location.search).get("name") ?? "";
|
||||
return platform.page.searchParams.get("name") ?? "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user