1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-26 10:05:10 +00:00
Files
MineXLauncher/src/resources/scripts/eagler-launch/1.9.4/main.ts
zumbiepig 76c28a5de1 step 2
2024-09-06 18:07:55 -07:00

22 lines
829 B
TypeScript

// @ts-nocheck
window.addEventListener('load', () => {
const relayId = Math.floor(Math.random() * 3);
window.eaglercraftXOpts = {
container: 'game_frame',
assetsURI: `${window.location.pathname}/assets.epk`,
localesURI: `${window.location.pathname}/lang/`,
servers: [{ addr: 'wss://eagler.xyz', name: 'TemuzX' }],
relays: [
{ addr: 'wss://relay.deev.is/', comment: 'lax1dude relay #1', primary: relayId === 0 },
{ addr: 'wss://relay.lax1dude.net/', comment: 'lax1dude relay #2', primary: relayId === 1 },
{ addr: 'wss://relay.shhnowisnottheti.me/', comment: 'ayunami relay #1', primary: relayId === 2 },
],
};
const urlParams = new URLSearchParams(window.location.search);
window.eaglercraftXOpts.joinServer = urlParams.get('server') ?? undefined;
history.replaceState({}, '', '/play');
main();
});