Revert NoDeepLinks

This commit is contained in:
thororen1234 2025-05-12 11:15:59 -04:00
parent 1646916bb3
commit 08f757a911
No known key found for this signature in database

View file

@ -4,19 +4,16 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Devs, EquicordDevs } from "@utils/constants";
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
export default definePlugin({
name: "DisableDeepLinks",
description: "Disables Discord's stupid deep linking feature which tries to force you to use their Desktop App",
authors: [Devs.Ven, EquicordDevs.Cootshk],
authors: [Devs.Ven],
required: true,
noop: () => { },
acceptInvite: () => {
open(document.location.href.replace(/invite/, "app/invite-with-guild-onboarding"), "_self");
},
patches: [
{
@ -25,14 +22,6 @@ export default definePlugin({
match: /\i\.\i\.openNativeAppModal/,
replace: "$self.noop",
}
},
{ // This says that it has no effect, but it does
find: /openApp\(/,
replacement: {
match: /\i\.\i\.launch\(\i,\i=>\{\i\.\i\.dispatch\(\i\?\{.*?\}:\{.*?\}\)\}\)/,
replace: "$self.acceptInvite()",
},
all: true
}
]
});