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