diff --git a/FUNDING.yml b/FUNDING.yml deleted file mode 100644 index 3bc679f..0000000 --- a/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [maisymoe, wingio] diff --git a/LICENSE b/LICENSE index 9e9ef99..cefb043 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ BSD 3-Clause License Copyright (c) 2023, Team Vendetta +Copyright (c) 2024, Team Revenge Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/build.mjs b/build.mjs index 320cdfe..170570e 100644 --- a/build.mjs +++ b/build.mjs @@ -14,7 +14,7 @@ const commit = (await exec("git rev-parse HEAD")).stdout.trim().substring(0, 7) try { await build({ entryPoints: ["./src/entry.ts"], - outfile: "./dist/vendetta.js", + outfile: "./dist/revenge.js", minify: true, bundle: true, format: "iife", @@ -44,10 +44,11 @@ try { alias(aliases), ], define: { + // TODO: Rename this property __vendettaVersion: `"${commit}"`, }, footer: { - js: "//# sourceURL=Vendetta", + js: "//# sourceURL=Revenge", }, legalComments: "none", }); diff --git a/package.json b/package.json index ba2367b..febe5da 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "vendetta", + "name": "revenge", "version": "1.0.0", - "description": "A mod for Discord's mobile apps.", + "description": "A modification for the Discord Android app.", "scripts": { "build": "bun run build.mjs" }, @@ -11,7 +11,7 @@ "ios", "react native" ], - "author": "Beef", + "author": "maisymoe", "license": "BSD-3-Clause", "devDependencies": { "@biomejs/biome": "^1.5.3", diff --git a/src/entry.ts b/src/entry.ts index dec955b..a8fc18f 100644 --- a/src/entry.ts +++ b/src/entry.ts @@ -1,7 +1,7 @@ import { ClientInfoManager } from "@lib/native"; // This logs in the native logging implementation, e.g. logcat -console.log("Hello from Vendetta!"); +console.log("Hello from Revenge!"); // Make 'freeze' and 'seal' do nothing Object.freeze = Object; @@ -10,9 +10,10 @@ Object.seal = Object; import(".").then((m) => m.default()).catch((e) => { console.log(e?.stack ?? e.toString()); alert([ - "Failed to load Vendetta!\n", + "Failed to load Revenge!\n", `Build Number: ${ClientInfoManager.Build}`, - `Vendetta: ${__vendettaVersion}`, + // TODO: Rename this + `Revenge: ${__vendettaVersion}`, e?.stack || e.toString(), ].join("\n")); }); diff --git a/src/index.ts b/src/index.ts index d32c177..3cdcfa7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -30,5 +30,5 @@ export default async () => { unloads.push(await initPlugins()); // We good :) - logger.log("Vendetta is ready!"); + logger.log("Revenge is ready!"); } diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 4f1b51d..d5ff8a2 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -1,8 +1,9 @@ +// TODO: Replace links and constants with actual values export const DISCORD_SERVER = "https://discord.gg/n9QQ4XhhJP"; export const DISCORD_SERVER_ID = "1015931589865246730"; export const PLUGINS_CHANNEL_ID = "1091880384561684561"; export const THEMES_CHANNEL_ID = "1091880434939482202"; -export const GITHUB = "https://github.com/vendetta-mod"; +export const GITHUB = "https://github.com/revenge-mod"; export const PROXY_PREFIX = "https://vd-plugins.github.io/proxy"; export const HTTP_REGEX = /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/; export const HTTP_REGEX_MULTI = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g; \ No newline at end of file diff --git a/src/lib/logger.ts b/src/lib/logger.ts index 1e107df..d4bf2e3 100644 --- a/src/lib/logger.ts +++ b/src/lib/logger.ts @@ -2,6 +2,6 @@ import { Logger } from "@types"; import { findByProps } from "@metro/filters"; export const logModule = findByProps("setLogFn").default; -const logger: Logger = new logModule("Vendetta"); +const logger: Logger = new logModule("Revenge"); export default logger; \ No newline at end of file diff --git a/src/lib/preinit.ts b/src/lib/preinit.ts index 7f1af9c..4e26d8a 100644 --- a/src/lib/preinit.ts +++ b/src/lib/preinit.ts @@ -40,6 +40,6 @@ if (window.__vendetta_loader?.features.themes) { try { initThemes(); } catch (e) { - console.error("[Vendetta] Failed to initialize themes...", e); + console.error("[Revenge] Failed to initialize themes...", e); } } \ No newline at end of file diff --git a/src/lib/windowObject.ts b/src/lib/windowObject.ts index 38e01c3..3bccec3 100644 --- a/src/lib/windowObject.ts +++ b/src/lib/windowObject.ts @@ -43,7 +43,7 @@ export default async (unloads: any[]): Promise => ({ version: debug.versionHash, unload: () => { unloads.filter(i => typeof i === "function").forEach(p => p()); - // @ts-expect-error explode + // @ts-expect-error On unload, nothing would be using this delete window.vendetta; }, }); diff --git a/src/ui/settings/components/PluginCard.tsx b/src/ui/settings/components/PluginCard.tsx index e4ffdec..1985943 100644 --- a/src/ui/settings/components/PluginCard.tsx +++ b/src/ui/settings/components/PluginCard.tsx @@ -114,7 +114,7 @@ export default function PluginCard({ item: plugin, index }: CardWrapper) actions={[ ...(settings ? [{ icon: "settings", - onPress: () => navigation.push("VendettaCustomPage", { + onPress: () => navigation.push("RevengeCustomPage", { title: plugin.manifest.name, render: settings, }) diff --git a/src/ui/settings/components/SettingsSection.tsx b/src/ui/settings/components/SettingsSection.tsx index 5a7174f..a063238 100644 --- a/src/ui/settings/components/SettingsSection.tsx +++ b/src/ui/settings/components/SettingsSection.tsx @@ -15,7 +15,7 @@ export default function SettingsSection() { return ( - + {screens.map((s, i) => ( <> any) | null) = export const getScreens = (youKeys = false): Screen[] => [ { - key: formatKey("VendettaSettings", youKeys), + key: formatKey("RevengeSettings", youKeys), title: "General", icon: "settings", render: General, }, { - key: formatKey("VendettaPlugins", youKeys), + key: formatKey("RevengePlugins", youKeys), title: "Plugins", icon: "debug", options: { @@ -51,7 +51,7 @@ export const getScreens = (youKeys = false): Screen[] => [ if (!input.startsWith(PROXY_PREFIX) && !settings.developerSettings) setImmediate(() => showConfirmationAlert({ title: "Unproxied Plugin", - content: "The plugin you are trying to install has not been proxied/verified by Vendetta staff. Are you sure you want to continue?", + content: "The plugin you are trying to install has not been verified by Revenge staff. Are you sure you want to continue?", confirmText: "Install", onConfirm: () => installPlugin(input) @@ -67,7 +67,7 @@ export const getScreens = (youKeys = false): Screen[] => [ render: Plugins, }, { - key: formatKey("VendettaThemes", youKeys), + key: formatKey("RevengeThemes", youKeys), title: "Themes", icon: "ic_theme_24px", // TODO: bad @@ -78,15 +78,15 @@ export const getScreens = (youKeys = false): Screen[] => [ render: Themes, }, { - key: formatKey("VendettaDeveloper", youKeys), + key: formatKey("RevengeDeveloper", youKeys), title: "Developer", icon: "ic_progress_wrench_24px", shouldRender: () => settings.developerSettings ?? false, render: Developer, }, { - key: formatKey("VendettaCustomPage", youKeys), - title: "Vendetta Page", + key: formatKey("RevengeCustomPage", youKeys), + title: "Revenge Page", shouldRender: () => false, render: ({ render: PageView, noErrorBoundary, ...options }: { render: React.ComponentType; noErrorBoundary: boolean } & Record) => { const navigation = NavigationNative.useNavigation(); @@ -110,8 +110,8 @@ export const getYouData = () => { return { getLayout: () => ({ - title: "Vendetta", - label: "Vendetta", + title: "Revenge", + label: "Revenge", // We can't use our keyMap function here since `settings` is an array not an object settings: getRenderableScreens(true).map(s => s.key) }), diff --git a/src/ui/settings/pages/Developer.tsx b/src/ui/settings/pages/Developer.tsx index bcceb62..a0374a6 100644 --- a/src/ui/settings/pages/Developer.tsx +++ b/src/ui/settings/pages/Developer.tsx @@ -48,7 +48,7 @@ export default function Developer() { {window.__vendetta_loader?.features.loaderConfig && } value={loaderConfig.customLoadUrl.enabled} onValueChange={(v: boolean) => { @@ -60,8 +60,8 @@ export default function Developer() { loaderConfig.customLoadUrl.url = v} - placeholder="http://localhost:4040/vendetta.js" - title="VENDETTA URL" + placeholder="http://localhost:4040/revenge.js" + title="REVENGE URL" /> } @@ -80,7 +80,7 @@ export default function Developer() { label="Asset Browser" leading={} trailing={FormRow.Arrow} - onPress={() => navigation.push("VendettaCustomPage", { + onPress={() => navigation.push("RevengeCustomPage", { title: "Asset Browser", render: AssetBrowser, })} @@ -100,8 +100,8 @@ export default function Developer() { options: [ // @ts-expect-error // Of course, to trigger an error, we need to do something incorrectly. The below will do! - { label: "Vendetta", onPress: () => navigation.push("VendettaCustomPage", { render: () => }) }, - { label: "Discord", isDestructive: true, onPress: () => navigation.push("VendettaCustomPage", { noErrorBoundary: true }) }, + { label: "Revenge", onPress: () => navigation.push("RevengeCustomPage", { render: () => }) }, + { label: "Discord", isDestructive: true, onPress: () => navigation.push("RevengeCustomPage", { noErrorBoundary: true }) }, ], })} /> diff --git a/src/ui/settings/pages/General.tsx b/src/ui/settings/pages/General.tsx index 1b94a30..5c9bec3 100644 --- a/src/ui/settings/pages/General.tsx +++ b/src/ui/settings/pages/General.tsx @@ -16,7 +16,7 @@ export default function General() { const versions = [ { - label: "Vendetta", + label: "Revenge", version: debugInfo.vendetta.version, icon: "ic_progress_wrench_24px", }, diff --git a/src/ui/settings/patches/you.tsx b/src/ui/settings/patches/you.tsx index 62a4c44..bc62c7b 100644 --- a/src/ui/settings/patches/you.tsx +++ b/src/ui/settings/patches/you.tsx @@ -44,7 +44,7 @@ function oldYouPatch(patches: Function[]) { ancestorRendererData: data.rendererConfigs[s.key], setting: s.key, title: data.titleConfig[s.key], - breadcrumbs: ["Vendetta"], + breadcrumbs: ["Revenge"], icon: data.rendererConfigs[s.key].icon, })), // .filter can be removed when dropping support for 189.3 and below (unless Discord changes things again) @@ -78,7 +78,7 @@ function newYouPatch(patches: Function[]) { patches.push(before("type", settingsListComponents.SearchableSettingsList, ([{ sections }]) => manipulateSections(sections, data.getLayout()))); patches.push(after("getSettingListSearchResultItems", gettersModule, (_, ret) => { - ret.forEach((s: any) => screens.some(b => b.key === s.setting) && (s.breadcrumbs = ["Vendetta"])) + ret.forEach((s: any) => screens.some(b => b.key === s.setting) && (s.breadcrumbs = ["Revenge"])) })); const oldRendererConfig = settingConstantsModule.SETTING_RENDERER_CONFIG; @@ -94,7 +94,7 @@ function newYouPatch(patches: Function[]) { const isLabel = (i: any, name: string) => i?.label === name || i?.title === name; function manipulateSections(sections: any[], layout: any) { - if (!Array.isArray(sections) || sections.find((i: any) => isLabel(i, "Vendetta"))) return; + if (!Array.isArray(sections) || sections.find((i: any) => isLabel(i, "Revenge"))) return; // Add our settings const accountSettingsIndex = sections.findIndex((i: any) => isLabel(i, i18n.Messages.ACCOUNT_SETTINGS));