mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-07 23:24:48 +00:00
.
This commit is contained in:
parent
d554212037
commit
2affbe701e
@ -1,9 +1,14 @@
|
||||
// @ts-nocheck
|
||||
import { Router } from 'express';
|
||||
const indexRouter = Router();
|
||||
import {
|
||||
Router,
|
||||
type Request,
|
||||
type Response,
|
||||
type NextFunction,
|
||||
} from 'express';
|
||||
|
||||
indexRouter.get('/', async (req, res) => {
|
||||
// router for future use
|
||||
const router = Router();
|
||||
|
||||
router.get('/', (_req: Request, _res: Response, next: NextFunction) => {
|
||||
next();
|
||||
});
|
||||
|
||||
export { indexRouter };
|
||||
export default router;
|
||||
|
@ -16,7 +16,7 @@ import morgan from 'morgan';
|
||||
import serveFavicon from 'serve-favicon';
|
||||
import serveStatic from 'serve-static';
|
||||
|
||||
import { indexRouter } from './routes/index.ts';
|
||||
import indexRouter from './routes/index.ts';
|
||||
|
||||
const BASE_DIR = join(import.meta.dir, 'public');
|
||||
const PORT = process.env['PORT'] ?? 3000;
|
||||
|
@ -8,7 +8,7 @@
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/game/web/clients/starlike/classes.js"></script>
|
||||
<script src="/resources/scripts/eagler-launch/1.8.8/eaglerpocketmobile.js"></script>
|
||||
<script src="/resources/scripts/eagler-launch/1.9.4/main.js"></script>
|
||||
<script src="/resources/scripts/eagler-launch/1.8.8/main.js"></script>
|
||||
</head>
|
||||
<body id="game_frame"></body>
|
||||
</html>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/game/web/main/1.11.2/classes.js"></script>
|
||||
<script src="/resources/scripts/eagler-launch/1.8.8/eaglerpocketmobile.js"></script>
|
||||
<script src="/resources/scripts/eagler-launch/1.9.4/main.js"></script>
|
||||
<script src="/resources/scripts/eagler-launch/1.8.8/main.js"></script>
|
||||
</head>
|
||||
<body id="game_frame"></body>
|
||||
</html>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<script src="/resources/scripts/google-tag.js"></script>
|
||||
<script src="/game/web/main/1.9.4/classes.js"></script>
|
||||
<script src="/resources/scripts/eagler-launch/1.8.8/eaglerpocketmobile.js"></script>
|
||||
<script src="/resources/scripts/eagler-launch/1.9.4/main.js"></script>
|
||||
<script src="/resources/scripts/eagler-launch/1.8.8/main.js"></script>
|
||||
</head>
|
||||
<body id="game_frame"></body>
|
||||
</html>
|
||||
|
@ -1,5 +1,41 @@
|
||||
// @ts-nocheck
|
||||
import { inflate } from 'pako';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
eaglercraftXOpts: {
|
||||
container: string;
|
||||
assetsURI: string;
|
||||
localesURI?: string;
|
||||
lang?: string;
|
||||
joinServer?: string;
|
||||
worldsDB?: string;
|
||||
resourcePacksDB?: string;
|
||||
demoMode?: boolean;
|
||||
servers: { addr: string; name: string }[];
|
||||
relays: { addr: string; comment: string; primary: boolean }[];
|
||||
checkShaderGLErrors?: boolean;
|
||||
enableDownloadOfflineButton?: boolean;
|
||||
downloadOfflineButtonLink?: string;
|
||||
html5CursorSupport?: boolean;
|
||||
allowUpdateSvc?: boolean;
|
||||
allowUpdateDL?: boolean;
|
||||
logInvalidCerts?: boolean;
|
||||
enableSignatureBadge?: boolean;
|
||||
checkRelaysForUpdates?: boolean;
|
||||
allowVoiceClient?: boolean;
|
||||
allowFNAWSkins?: boolean;
|
||||
localStorageNamespace?: string;
|
||||
enableMinceraft?: boolean;
|
||||
hooks?: {
|
||||
localStorageSaved?: (key: string, data: string) => void;
|
||||
localStorageLoaded?: (key: string) => string | null;
|
||||
};
|
||||
Mods?: string[];
|
||||
};
|
||||
main: () => void;
|
||||
}
|
||||
}
|
||||
|
||||
const storage = {
|
||||
local: {
|
||||
get: function (key: string) {
|
||||
@ -15,6 +51,7 @@ const storage = {
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const base64Gzip = {
|
||||
decompress: function (string: string): string {
|
||||
return inflate(
|
||||
@ -24,13 +61,12 @@ const base64Gzip = {
|
||||
},
|
||||
};
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
const relayId = Math.floor(Math.random() * 3);
|
||||
window.eaglercraftXOpts = {
|
||||
const randomRelay = Math.floor(Math.random() * 3);
|
||||
window.eaglercraftXOpts = {
|
||||
container: 'game_frame',
|
||||
assetsURI: `${window.location.pathname}/assets.epk`,
|
||||
localesURI: `${window.location.pathname}/lang/`,
|
||||
assetsURI: 'assets.epk',
|
||||
servers: [
|
||||
{ addr: 'wss://temuzx.xyz', name: 'TemuzX' },
|
||||
{ addr: 'wss://webmc.xyz/server', name: 'WebMC OneBlock' },
|
||||
{ addr: 'wss://mc.ricenetwork.xyz', name: 'Rice Network' },
|
||||
{ addr: 'wss://mc.lamplifesteal.xyz', name: 'LampLifesteal' },
|
||||
@ -39,27 +75,26 @@ window.addEventListener('load', () => {
|
||||
],
|
||||
relays: [
|
||||
{
|
||||
addr: 'wss://relay.deev.is/',
|
||||
addr: 'wss://relay.deev.is',
|
||||
comment: 'lax1dude relay #1',
|
||||
primary: relayId === 0,
|
||||
primary: randomRelay === 0,
|
||||
},
|
||||
{
|
||||
addr: 'wss://relay.lax1dude.net/',
|
||||
addr: 'wss://relay.lax1dude.net',
|
||||
comment: 'lax1dude relay #2',
|
||||
primary: relayId === 1,
|
||||
primary: randomRelay === 1,
|
||||
},
|
||||
{
|
||||
addr: 'wss://relay.shhnowisnottheti.me/',
|
||||
addr: 'wss://relay.shhnowisnottheti.me',
|
||||
comment: 'ayunami relay #1',
|
||||
primary: relayId === 2,
|
||||
primary: randomRelay === 2,
|
||||
},
|
||||
],
|
||||
};
|
||||
Mods: storage.local.get('mods') ?? [],
|
||||
};
|
||||
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
window.eaglercraftXOpts.joinServer = urlParams.get('server') ?? undefined;
|
||||
window.eaglercraftXOpts.Mods = storage.local.get('mods') ?? [];
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const server = urlParams.get('server');
|
||||
if (server) window.eaglercraftXOpts.joinServer = server;
|
||||
|
||||
history.replaceState({}, '', '/play');
|
||||
main();
|
||||
});
|
||||
window.onload = () => window.main();
|
||||
|
@ -1,33 +0,0 @@
|
||||
// @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://temuzx.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();
|
||||
});
|
@ -1,4 +1,9 @@
|
||||
// @ts-nocheck
|
||||
declare global {
|
||||
interface Window {
|
||||
dataLayer: unknown[];
|
||||
}
|
||||
}
|
||||
|
||||
const googleTag = document.createElement('script');
|
||||
googleTag.async = true;
|
||||
googleTag.src = 'https://www.googletagmanager.com/gtag/js?id=G-GD4SJRCR7Z';
|
||||
@ -6,7 +11,7 @@ document.head.appendChild(googleTag);
|
||||
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(...args: unknown[]) {
|
||||
dataLayer.push(...args);
|
||||
window.dataLayer.push(...args);
|
||||
}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-GD4SJRCR7Z');
|
||||
|
@ -1,6 +1,4 @@
|
||||
// @ts-nocheck
|
||||
/*
|
||||
const cacheVersion = '1.6';
|
||||
/* const cacheVersion = '1.6';
|
||||
const cacheName = `minexlauncher-full-v${cacheVersion}`;
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
@ -57,5 +55,4 @@ self.addEventListener('fetch', (event) => {
|
||||
return response ?? fetch(event.request);
|
||||
}),
|
||||
);
|
||||
});
|
||||
*/
|
||||
}); */
|
||||
|
Loading…
x
Reference in New Issue
Block a user