mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 21:53:04 -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
|
||||
*/
|
||||
|
||||
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
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue