Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<meta name="viewport" content="width=device-width, initial-scale = 0.86, maximum-scale=3.0, minimum-scale=0.86">

<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="manifest" href="/manifest.json">

<style>
body {
Expand Down
10 changes: 8 additions & 2 deletions src/js/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import {setupConfiguration} from './configuration';
import Tile from './jagex2/dash3d/type/Tile';
import DirectionFlag from './jagex2/dash3d/DirectionFlag';
import ClientWorkerStream from './jagex2/io/ClientWorkerStream';
import {Host, Peer} from './jagex2/io/RTCDataChannels';
import {setupManifest} from './manifest';

// noinspection JSSuspiciousNameCombination
class Game extends Client {
Expand Down Expand Up @@ -860,7 +860,12 @@ class Game extends Client {
}
this.stream = new ClientWorkerStream(this.worker!, this.host!.uniqueId);
} else {
this.stream = new ClientStream(await ClientStream.openSocket({host: Client.serverAddress, port: 43594 + Client.portOffset}));
this.stream = new ClientStream(
await ClientStream.openSocket({
host: Client.serverAddress,
port: 43594 + Client.portOffset
})
);
}
await this.stream.readBytes(this.in.data, 0, 8);
this.in.pos = 0;
Expand Down Expand Up @@ -9490,5 +9495,6 @@ class Game extends Client {
}

console.log(`RS2 user client - release #${Client.clientversion}`);
setupManifest();
await setupConfiguration();
new Game().run().then((): void => {});
7 changes: 7 additions & 0 deletions src/js/manifest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function setupManifest(): void {
const location: Location = window.location;
const manifest: HTMLLinkElement = document.createElement('link');
manifest.rel = 'manifest';
manifest.href = `${location.href.substring(0, location.href.indexOf(location.search))}/manifest.json`;
document.head.appendChild(manifest);
}
Loading