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
|
BSD 3-Clause License
|
||||||
|
|
||||||
Copyright (c) 2023, Team Vendetta
|
Copyright (c) 2023, Team Vendetta
|
||||||
|
Copyright (c) 2024, Team Revenge
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
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 {
|
try {
|
||||||
await build({
|
await build({
|
||||||
entryPoints: ["./src/entry.ts"],
|
entryPoints: ["./src/entry.ts"],
|
||||||
outfile: "./dist/vendetta.js",
|
outfile: "./dist/revenge.js",
|
||||||
minify: true,
|
minify: true,
|
||||||
bundle: true,
|
bundle: true,
|
||||||
format: "iife",
|
format: "iife",
|
||||||
|
@ -44,10 +44,11 @@ try {
|
||||||
alias(aliases),
|
alias(aliases),
|
||||||
],
|
],
|
||||||
define: {
|
define: {
|
||||||
|
// TODO: Rename this property
|
||||||
__vendettaVersion: `"${commit}"`,
|
__vendettaVersion: `"${commit}"`,
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
js: "//# sourceURL=Vendetta",
|
js: "//# sourceURL=Revenge",
|
||||||
},
|
},
|
||||||
legalComments: "none",
|
legalComments: "none",
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "vendetta",
|
"name": "revenge",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "A mod for Discord's mobile apps.",
|
"description": "A modification for the Discord Android app.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "bun run build.mjs"
|
"build": "bun run build.mjs"
|
||||||
},
|
},
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
"ios",
|
"ios",
|
||||||
"react native"
|
"react native"
|
||||||
],
|
],
|
||||||
"author": "Beef",
|
"author": "maisymoe",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^1.5.3",
|
"@biomejs/biome": "^1.5.3",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ClientInfoManager } from "@lib/native";
|
import { ClientInfoManager } from "@lib/native";
|
||||||
|
|
||||||
// This logs in the native logging implementation, e.g. logcat
|
// 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
|
// Make 'freeze' and 'seal' do nothing
|
||||||
Object.freeze = Object;
|
Object.freeze = Object;
|
||||||
|
@ -10,9 +10,10 @@ Object.seal = Object;
|
||||||
import(".").then((m) => m.default()).catch((e) => {
|
import(".").then((m) => m.default()).catch((e) => {
|
||||||
console.log(e?.stack ?? e.toString());
|
console.log(e?.stack ?? e.toString());
|
||||||
alert([
|
alert([
|
||||||
"Failed to load Vendetta!\n",
|
"Failed to load Revenge!\n",
|
||||||
`Build Number: ${ClientInfoManager.Build}`,
|
`Build Number: ${ClientInfoManager.Build}`,
|
||||||
`Vendetta: ${__vendettaVersion}`,
|
// TODO: Rename this
|
||||||
|
`Revenge: ${__vendettaVersion}`,
|
||||||
e?.stack || e.toString(),
|
e?.stack || e.toString(),
|
||||||
].join("\n"));
|
].join("\n"));
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,5 +30,5 @@ export default async () => {
|
||||||
unloads.push(await initPlugins());
|
unloads.push(await initPlugins());
|
||||||
|
|
||||||
// We good :)
|
// 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 = "https://discord.gg/n9QQ4XhhJP";
|
||||||
export const DISCORD_SERVER_ID = "1015931589865246730";
|
export const DISCORD_SERVER_ID = "1015931589865246730";
|
||||||
export const PLUGINS_CHANNEL_ID = "1091880384561684561";
|
export const PLUGINS_CHANNEL_ID = "1091880384561684561";
|
||||||
export const THEMES_CHANNEL_ID = "1091880434939482202";
|
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 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 = /^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;
|
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";
|
import { findByProps } from "@metro/filters";
|
||||||
|
|
||||||
export const logModule = findByProps("setLogFn").default;
|
export const logModule = findByProps("setLogFn").default;
|
||||||
const logger: Logger = new logModule("Vendetta");
|
const logger: Logger = new logModule("Revenge");
|
||||||
|
|
||||||
export default logger;
|
export default logger;
|
|
@ -40,6 +40,6 @@ if (window.__vendetta_loader?.features.themes) {
|
||||||
try {
|
try {
|
||||||
initThemes();
|
initThemes();
|
||||||
} catch (e) {
|
} 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,
|
version: debug.versionHash,
|
||||||
unload: () => {
|
unload: () => {
|
||||||
unloads.filter(i => typeof i === "function").forEach(p => p());
|
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;
|
delete window.vendetta;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -114,7 +114,7 @@ export default function PluginCard({ item: plugin, index }: CardWrapper<Plugin>)
|
||||||
actions={[
|
actions={[
|
||||||
...(settings ? [{
|
...(settings ? [{
|
||||||
icon: "settings",
|
icon: "settings",
|
||||||
onPress: () => navigation.push("VendettaCustomPage", {
|
onPress: () => navigation.push("RevengeCustomPage", {
|
||||||
title: plugin.manifest.name,
|
title: plugin.manifest.name,
|
||||||
render: settings,
|
render: settings,
|
||||||
})
|
})
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default function SettingsSection() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ErrorBoundary>
|
<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) => (
|
{screens.map((s, i) => (
|
||||||
<>
|
<>
|
||||||
<FormRow
|
<FormRow
|
||||||
|
|
|
@ -34,13 +34,13 @@ const keyMap = (screens: Screen[], data: string | ((s: Screen) => any) | null) =
|
||||||
|
|
||||||
export const getScreens = (youKeys = false): Screen[] => [
|
export const getScreens = (youKeys = false): Screen[] => [
|
||||||
{
|
{
|
||||||
key: formatKey("VendettaSettings", youKeys),
|
key: formatKey("RevengeSettings", youKeys),
|
||||||
title: "General",
|
title: "General",
|
||||||
icon: "settings",
|
icon: "settings",
|
||||||
render: General,
|
render: General,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: formatKey("VendettaPlugins", youKeys),
|
key: formatKey("RevengePlugins", youKeys),
|
||||||
title: "Plugins",
|
title: "Plugins",
|
||||||
icon: "debug",
|
icon: "debug",
|
||||||
options: {
|
options: {
|
||||||
|
@ -51,7 +51,7 @@ export const getScreens = (youKeys = false): Screen[] => [
|
||||||
if (!input.startsWith(PROXY_PREFIX) && !settings.developerSettings)
|
if (!input.startsWith(PROXY_PREFIX) && !settings.developerSettings)
|
||||||
setImmediate(() => showConfirmationAlert({
|
setImmediate(() => showConfirmationAlert({
|
||||||
title: "Unproxied Plugin",
|
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",
|
confirmText: "Install",
|
||||||
onConfirm: () =>
|
onConfirm: () =>
|
||||||
installPlugin(input)
|
installPlugin(input)
|
||||||
|
@ -67,7 +67,7 @@ export const getScreens = (youKeys = false): Screen[] => [
|
||||||
render: Plugins,
|
render: Plugins,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: formatKey("VendettaThemes", youKeys),
|
key: formatKey("RevengeThemes", youKeys),
|
||||||
title: "Themes",
|
title: "Themes",
|
||||||
icon: "ic_theme_24px",
|
icon: "ic_theme_24px",
|
||||||
// TODO: bad
|
// TODO: bad
|
||||||
|
@ -78,15 +78,15 @@ export const getScreens = (youKeys = false): Screen[] => [
|
||||||
render: Themes,
|
render: Themes,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: formatKey("VendettaDeveloper", youKeys),
|
key: formatKey("RevengeDeveloper", youKeys),
|
||||||
title: "Developer",
|
title: "Developer",
|
||||||
icon: "ic_progress_wrench_24px",
|
icon: "ic_progress_wrench_24px",
|
||||||
shouldRender: () => settings.developerSettings ?? false,
|
shouldRender: () => settings.developerSettings ?? false,
|
||||||
render: Developer,
|
render: Developer,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: formatKey("VendettaCustomPage", youKeys),
|
key: formatKey("RevengeCustomPage", youKeys),
|
||||||
title: "Vendetta Page",
|
title: "Revenge Page",
|
||||||
shouldRender: () => false,
|
shouldRender: () => false,
|
||||||
render: ({ render: PageView, noErrorBoundary, ...options }: { render: React.ComponentType; noErrorBoundary: boolean } & Record<string, object>) => {
|
render: ({ render: PageView, noErrorBoundary, ...options }: { render: React.ComponentType; noErrorBoundary: boolean } & Record<string, object>) => {
|
||||||
const navigation = NavigationNative.useNavigation();
|
const navigation = NavigationNative.useNavigation();
|
||||||
|
@ -110,8 +110,8 @@ export const getYouData = () => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
getLayout: () => ({
|
getLayout: () => ({
|
||||||
title: "Vendetta",
|
title: "Revenge",
|
||||||
label: "Vendetta",
|
label: "Revenge",
|
||||||
// We can't use our keyMap function here since `settings` is an array not an object
|
// We can't use our keyMap function here since `settings` is an array not an object
|
||||||
settings: getRenderableScreens(true).map(s => s.key)
|
settings: getRenderableScreens(true).map(s => s.key)
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default function Developer() {
|
||||||
{window.__vendetta_loader?.features.loaderConfig && <FormSection title="Loader config">
|
{window.__vendetta_loader?.features.loaderConfig && <FormSection title="Loader config">
|
||||||
<FormSwitchRow
|
<FormSwitchRow
|
||||||
label="Load from custom url"
|
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")} />}
|
leading={<FormRow.Icon source={getAssetIDByName("copy")} />}
|
||||||
value={loaderConfig.customLoadUrl.enabled}
|
value={loaderConfig.customLoadUrl.enabled}
|
||||||
onValueChange={(v: boolean) => {
|
onValueChange={(v: boolean) => {
|
||||||
|
@ -60,8 +60,8 @@ export default function Developer() {
|
||||||
<FormInput
|
<FormInput
|
||||||
value={loaderConfig.customLoadUrl.url}
|
value={loaderConfig.customLoadUrl.url}
|
||||||
onChange={(v: string) => loaderConfig.customLoadUrl.url = v}
|
onChange={(v: string) => loaderConfig.customLoadUrl.url = v}
|
||||||
placeholder="http://localhost:4040/vendetta.js"
|
placeholder="http://localhost:4040/revenge.js"
|
||||||
title="VENDETTA URL"
|
title="REVENGE URL"
|
||||||
/>
|
/>
|
||||||
<FormDivider />
|
<FormDivider />
|
||||||
</>}
|
</>}
|
||||||
|
@ -80,7 +80,7 @@ export default function Developer() {
|
||||||
label="Asset Browser"
|
label="Asset Browser"
|
||||||
leading={<FormRow.Icon source={getAssetIDByName("ic_image")} />}
|
leading={<FormRow.Icon source={getAssetIDByName("ic_image")} />}
|
||||||
trailing={FormRow.Arrow}
|
trailing={FormRow.Arrow}
|
||||||
onPress={() => navigation.push("VendettaCustomPage", {
|
onPress={() => navigation.push("RevengeCustomPage", {
|
||||||
title: "Asset Browser",
|
title: "Asset Browser",
|
||||||
render: AssetBrowser,
|
render: AssetBrowser,
|
||||||
})}
|
})}
|
||||||
|
@ -100,8 +100,8 @@ export default function Developer() {
|
||||||
options: [
|
options: [
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
// Of course, to trigger an error, we need to do something incorrectly. The below will do!
|
// 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: "Revenge", onPress: () => navigation.push("RevengeCustomPage", { render: () => <undefined /> }) },
|
||||||
{ label: "Discord", isDestructive: true, onPress: () => navigation.push("VendettaCustomPage", { noErrorBoundary: true }) },
|
{ label: "Discord", isDestructive: true, onPress: () => navigation.push("RevengeCustomPage", { noErrorBoundary: true }) },
|
||||||
],
|
],
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -16,7 +16,7 @@ export default function General() {
|
||||||
|
|
||||||
const versions = [
|
const versions = [
|
||||||
{
|
{
|
||||||
label: "Vendetta",
|
label: "Revenge",
|
||||||
version: debugInfo.vendetta.version,
|
version: debugInfo.vendetta.version,
|
||||||
icon: "ic_progress_wrench_24px",
|
icon: "ic_progress_wrench_24px",
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,7 +44,7 @@ function oldYouPatch(patches: Function[]) {
|
||||||
ancestorRendererData: data.rendererConfigs[s.key],
|
ancestorRendererData: data.rendererConfigs[s.key],
|
||||||
setting: s.key,
|
setting: s.key,
|
||||||
title: data.titleConfig[s.key],
|
title: data.titleConfig[s.key],
|
||||||
breadcrumbs: ["Vendetta"],
|
breadcrumbs: ["Revenge"],
|
||||||
icon: data.rendererConfigs[s.key].icon,
|
icon: data.rendererConfigs[s.key].icon,
|
||||||
})),
|
})),
|
||||||
// .filter can be removed when dropping support for 189.3 and below (unless Discord changes things again)
|
// .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(before("type", settingsListComponents.SearchableSettingsList, ([{ sections }]) => manipulateSections(sections, data.getLayout())));
|
||||||
|
|
||||||
patches.push(after("getSettingListSearchResultItems", gettersModule, (_, ret) => {
|
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;
|
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;
|
const isLabel = (i: any, name: string) => i?.label === name || i?.title === name;
|
||||||
|
|
||||||
function manipulateSections(sections: any[], layout: any) {
|
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
|
// Add our settings
|
||||||
const accountSettingsIndex = sections.findIndex((i: any) => isLabel(i, i18n.Messages.ACCOUNT_SETTINGS));
|
const accountSettingsIndex = sections.findIndex((i: any) => isLabel(i, i18n.Messages.ACCOUNT_SETTINGS));
|
||||||
|
|
Loading…
Reference in a new issue