Plugin

AlwaysTrust

Removes the annoying untrusted domain and suspicious file popup

Utility
index.ts
Download

Source

src/plugins/alwaysTrust/index.ts
1/*
2 * FiveCord — a Discord client mod
3 * Copyright (c) 2025 FiveCord
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7import { definePluginSettings } from "@api/Settings";
8import { Devs } from "@utils/constants";
9import definePlugin, { OptionType } from "@utils/types";
10
11const settings = definePluginSettings({
12 domain: {
13 type: OptionType.BOOLEAN,
14 default: true,
15 description: "Remove the untrusted domain popup when opening links",
16 restartNeeded: true
17 },
18 file: {
19 type: OptionType.BOOLEAN,
20 default: true,
21 description: "Remove the 'Potentially Dangerous Download' popup when opening links",
22 restartNeeded: true
23 }
24});
25
26export default definePlugin({
27 name: "AlwaysTrust",
28 description: "Removes the annoying untrusted domain and suspicious file popup",
29 tags: ["Utility"],
30 authors: [Devs.zt, Devs.Trwy],
31 patches: [
32 {
33 find: '="MaskedLinkStore",',
34 replacement: {
35 match: /(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,
36 replace: "return true"
37 },
38 predicate: () => settings.store.domain
39 },
40 {
41 find: "bitbucket.org",
42 replacement: {
43 match: /function \i\(\i\){(?=.{0,30}pathname:\i)/,
44 replace: "$&return null;"
45 },
46 predicate: () => settings.store.file
47 }
48 ],
49 settings
50});
51