Revenge/src/index.ts

23 lines
597 B
TypeScript
Raw Normal View History

2022-10-18 22:04:55 +00:00
import patcher from "@lib/patcher";
import logger from "@lib/logger";
import * as metro from "@metro/filters";
import * as common from "@metro/common";
import initSettings from "./ui/settings";
2022-10-18 22:04:55 +00:00
console.log("Hello from Vendetta!");
2022-10-19 06:58:32 +00:00
let erroredOnLoad = false;
2022-10-18 22:04:55 +00:00
try {
initSettings();
2022-10-18 22:04:55 +00:00
window.vendetta = {
patcher: patcher,
metro: { ...metro, common: common },
logger: logger,
};
} catch (e: Error | any) {
2022-10-19 06:58:32 +00:00
erroredOnLoad = true;
2022-10-18 22:04:55 +00:00
alert(`Vendetta failed to initialize...\n${e.stack || e.toString()}`);
2022-10-19 06:58:32 +00:00
}
if (!erroredOnLoad) logger.log("Vendetta is ready!");