aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/clickableRoleDot.ts11
-rw-r--r--src/plugins/noRPC.ts1
-rw-r--r--src/plugins/noSystemBadge.ts1
-rw-r--r--src/plugins/settings.ts15
4 files changed, 21 insertions, 7 deletions
diff --git a/src/plugins/clickableRoleDot.ts b/src/plugins/clickableRoleDot.ts
index 61e6b28..28a511d 100644
--- a/src/plugins/clickableRoleDot.ts
+++ b/src/plugins/clickableRoleDot.ts
@@ -18,7 +18,16 @@ export default definePlugin({
],
copyToClipBoard(color: string) {
- window.DiscordNative.clipboard.copy(color);
+ if (IS_WEB) {
+ navigator.clipboard.writeText(color)
+ .then(() => this.notifySuccess);
+ } else {
+ DiscordNative.clipboard.copy(color);
+ this.notifySuccess();
+ }
+ },
+
+ notifySuccess() {
Toasts.show({
message: "Copied to Clipboard!",
type: Toasts.Type.SUCCESS,
diff --git a/src/plugins/noRPC.ts b/src/plugins/noRPC.ts
index 95dcf04..f1094fd 100644
--- a/src/plugins/noRPC.ts
+++ b/src/plugins/noRPC.ts
@@ -5,6 +5,7 @@ export default definePlugin({
name: "No RPC",
description: "Disables Discord's RPC server.",
authors: [Devs.Cyn],
+ target: "DESKTOP",
patches: [
{
find: '.ensureModule("discord_rpc")',
diff --git a/src/plugins/noSystemBadge.ts b/src/plugins/noSystemBadge.ts
index 25f873b..7b687c7 100644
--- a/src/plugins/noSystemBadge.ts
+++ b/src/plugins/noSystemBadge.ts
@@ -5,6 +5,7 @@ export default definePlugin({
name: "NoSystemBadge",
description: "Disables the taskbar and system tray unread count badge.",
authors: [Devs.rushii],
+ target: "DESKTOP",
patches: [
{
find: "setSystemTrayApplications:function",
diff --git a/src/plugins/settings.ts b/src/plugins/settings.ts
index afd3fd3..d26688a 100644
--- a/src/plugins/settings.ts
+++ b/src/plugins/settings.ts
@@ -28,12 +28,15 @@ export default definePlugin({
find: "Messages.ACTIVITY_SETTINGS",
replacement: {
match: /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/,
- replace: (m, mod) =>
- `{section:${mod}.ID.HEADER,label:"Vencord"},` +
- '{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' +
- '{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater,predicate:()=>!IS_WEB},' +
- `{section:${mod}.ID.DIVIDER},${m}`
-
+ replace: (m, mod) => {
+ const updater = !IS_WEB ? '{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater},' : "";
+ return (
+ `{section:${mod}.ID.HEADER,label:"Vencord"},` +
+ '{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' +
+ updater +
+ `{section:${mod}.ID.DIVIDER},${m}`
+ );
+ }
}
}]
});