chore: remove instances of Vendetta
in places
This hopefully shouldn't break things, unless some kind of plugin depend on finding stuff with the string `Vendetta`. That is a very bad practice though
This commit is contained in:
parent
6728bb9270
commit
d0b9d63d12
16 changed files with 38 additions and 35 deletions
|
@ -1 +0,0 @@
|
|||
github: [maisymoe, wingio]
|
1
LICENSE
1
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:
|
||||
|
|
|
@ -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",
|
||||
});
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"));
|
||||
});
|
||||
|
|
|
@ -30,5 +30,5 @@ export default async () => {
|
|||
unloads.push(await initPlugins());
|
||||
|
||||
// We good :)
|
||||
logger.log("Vendetta is ready!");
|
||||
logger.log("Revenge is ready!");
|
||||
}
|
||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -43,7 +43,7 @@ export default async (unloads: any[]): Promise<VendettaObject> => ({
|
|||
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;
|
||||
},
|
||||
});
|
||||
|
|
|
@ -114,7 +114,7 @@ export default function PluginCard({ item: plugin, index }: CardWrapper<Plugin>)
|
|||
actions={[
|
||||
...(settings ? [{
|
||||
icon: "settings",
|
||||
onPress: () => navigation.push("VendettaCustomPage", {
|
||||
onPress: () => navigation.push("RevengeCustomPage", {
|
||||
title: plugin.manifest.name,
|
||||
render: settings,
|
||||
})
|
||||
|
|
|
@ -15,7 +15,7 @@ export default function SettingsSection() {
|
|||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<FormSection key="Vendetta" title={`Vendetta${settings.safeMode?.enabled ? " (Safe Mode)" : ""}`}>
|
||||
<FormSection key="Revenge" title={`Revenge${settings.safeMode?.enabled ? " (Safe Mode)" : ""}`}>
|
||||
{screens.map((s, i) => (
|
||||
<>
|
||||
<FormRow
|
||||
|
|
|
@ -34,13 +34,13 @@ const keyMap = (screens: Screen[], data: string | ((s: Screen) => 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<string, object>) => {
|
||||
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)
|
||||
}),
|
||||
|
|
|
@ -48,7 +48,7 @@ export default function Developer() {
|
|||
{window.__vendetta_loader?.features.loaderConfig && <FormSection title="Loader config">
|
||||
<FormSwitchRow
|
||||
label="Load from custom url"
|
||||
subLabel={"Load Vendetta from a custom endpoint."}
|
||||
subLabel={"Load Revenge from a custom endpoint."}
|
||||
leading={<FormRow.Icon source={getAssetIDByName("copy")} />}
|
||||
value={loaderConfig.customLoadUrl.enabled}
|
||||
onValueChange={(v: boolean) => {
|
||||
|
@ -60,8 +60,8 @@ export default function Developer() {
|
|||
<FormInput
|
||||
value={loaderConfig.customLoadUrl.url}
|
||||
onChange={(v: string) => loaderConfig.customLoadUrl.url = v}
|
||||
placeholder="http://localhost:4040/vendetta.js"
|
||||
title="VENDETTA URL"
|
||||
placeholder="http://localhost:4040/revenge.js"
|
||||
title="REVENGE URL"
|
||||
/>
|
||||
<FormDivider />
|
||||
</>}
|
||||
|
@ -80,7 +80,7 @@ export default function Developer() {
|
|||
label="Asset Browser"
|
||||
leading={<FormRow.Icon source={getAssetIDByName("ic_image")} />}
|
||||
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: () => <undefined /> }) },
|
||||
{ label: "Discord", isDestructive: true, onPress: () => navigation.push("VendettaCustomPage", { noErrorBoundary: true }) },
|
||||
{ label: "Revenge", onPress: () => navigation.push("RevengeCustomPage", { render: () => <undefined /> }) },
|
||||
{ label: "Discord", isDestructive: true, onPress: () => navigation.push("RevengeCustomPage", { noErrorBoundary: true }) },
|
||||
],
|
||||
})}
|
||||
/>
|
||||
|
|
|
@ -16,7 +16,7 @@ export default function General() {
|
|||
|
||||
const versions = [
|
||||
{
|
||||
label: "Vendetta",
|
||||
label: "Revenge",
|
||||
version: debugInfo.vendetta.version,
|
||||
icon: "ic_progress_wrench_24px",
|
||||
},
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue