mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 06:03:03 -04:00
Revert NoDeepLinks
This commit is contained in:
parent
1646916bb3
commit
08f757a911
1 changed files with 2 additions and 13 deletions
|
@ -4,19 +4,16 @@
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Devs, EquicordDevs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "DisableDeepLinks",
|
name: "DisableDeepLinks",
|
||||||
description: "Disables Discord's stupid deep linking feature which tries to force you to use their Desktop App",
|
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,
|
required: true,
|
||||||
|
|
||||||
noop: () => { },
|
noop: () => { },
|
||||||
acceptInvite: () => {
|
|
||||||
open(document.location.href.replace(/invite/, "app/invite-with-guild-onboarding"), "_self");
|
|
||||||
},
|
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
|
@ -25,14 +22,6 @@ export default definePlugin({
|
||||||
match: /\i\.\i\.openNativeAppModal/,
|
match: /\i\.\i\.openNativeAppModal/,
|
||||||
replace: "$self.noop",
|
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
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue