2023-02-04 02:30:46 +00:00
|
|
|
import { patchLogHook } from "@lib/debug";
|
2024-02-28 14:09:42 +08:00
|
|
|
import { patchCommands } from "@/lib/api/commands";
|
|
|
|
|
import { initPlugins } from "@lib/managers/plugins";
|
|
|
|
|
import { patchChatBackground } from "@lib/managers/themes";
|
|
|
|
|
import { patchAssets } from "@/lib/api/assets";
|
2023-04-03 20:35:59 -04:00
|
|
|
import initQuickInstall from "@ui/quickInstall";
|
2023-04-13 18:42:14 +00:00
|
|
|
import initSafeMode from "@ui/safeMode";
|
2022-10-20 07:58:17 +01:00
|
|
|
import initSettings from "@ui/settings";
|
2024-02-28 14:09:42 +08:00
|
|
|
import initFixes from "@/core/fixes";
|
|
|
|
|
import logger from "@lib/utils/logger";
|
2024-02-23 13:29:06 +08:00
|
|
|
import initWindowObject from "@lib/windowObject";
|
2022-10-18 23:04:55 +01:00
|
|
|
|
2023-03-16 00:36:12 +08:00
|
|
|
export default async () => {
|
|
|
|
|
// Load everything in parallel
|
|
|
|
|
const unloads = await Promise.all([
|
|
|
|
|
patchLogHook(),
|
|
|
|
|
patchAssets(),
|
|
|
|
|
patchCommands(),
|
2023-04-16 00:08:08 +08:00
|
|
|
patchChatBackground(),
|
2023-03-16 00:36:12 +08:00
|
|
|
initFixes(),
|
2023-04-13 18:42:14 +00:00
|
|
|
initSafeMode(),
|
2023-03-16 00:36:12 +08:00
|
|
|
initSettings(),
|
2023-04-03 20:35:59 -04:00
|
|
|
initQuickInstall(),
|
2023-03-16 00:36:12 +08:00
|
|
|
]);
|
2022-10-18 23:04:55 +01:00
|
|
|
|
2023-03-16 00:36:12 +08:00
|
|
|
// Assign window object
|
2024-02-23 13:29:06 +08:00
|
|
|
initWindowObject(unloads);
|
2023-01-01 21:10:09 +00:00
|
|
|
|
2023-03-16 00:36:12 +08:00
|
|
|
// Once done, load plugins
|
|
|
|
|
unloads.push(await initPlugins());
|
2023-02-04 02:30:46 +00:00
|
|
|
|
2023-03-16 00:36:12 +08:00
|
|
|
// We good :)
|
|
|
|
|
logger.log("Vendetta is ready!");
|
|
|
|
|
}
|