From 30ac25607023752031aa98060cbf8a736109992d Mon Sep 17 00:00:00 2001 From: V Date: Sun, 24 Sep 2023 16:02:18 +0200 Subject: migrate all plugins to folders --- src/plugins/alwaysAnimate.ts | 37 - src/plugins/alwaysAnimate/index.ts | 37 + src/plugins/alwaysTrust.ts | 42 -- src/plugins/alwaysTrust/index.ts | 42 ++ src/plugins/anonymiseFileNames.ts | 94 --- src/plugins/anonymiseFileNames/index.ts | 94 +++ src/plugins/arRPC.web.tsx | 109 --- src/plugins/arRPC.web/index.tsx | 109 +++ src/plugins/banger.ts | 43 -- src/plugins/banger/index.ts | 43 ++ src/plugins/betterGifAltText.ts | 69 -- src/plugins/betterGifAltText/index.ts | 69 ++ src/plugins/betterNotes.ts | 60 -- src/plugins/betterNotes/index.ts | 60 ++ src/plugins/betterRoleDot.ts | 93 --- src/plugins/betterRoleDot/index.ts | 93 +++ src/plugins/betterUploadButton.ts | 38 - src/plugins/betterUploadButton/index.ts | 38 + src/plugins/blurNsfw.ts | 77 -- src/plugins/blurNsfw/index.ts | 77 ++ src/plugins/callTimer.tsx | 95 --- src/plugins/callTimer/index.tsx | 95 +++ src/plugins/colorSighted.ts | 42 -- src/plugins/colorSighted/index.ts | 42 ++ src/plugins/consoleShortcuts.ts | 112 --- src/plugins/consoleShortcuts/index.ts | 112 +++ src/plugins/copyUserURLs.tsx | 55 -- src/plugins/copyUserURLs/index.tsx | 55 ++ src/plugins/crashHandler.ts | 158 ----- src/plugins/crashHandler/index.ts | 158 +++++ src/plugins/customRPC.tsx | 425 ------------ src/plugins/customRPC/index.tsx | 425 ++++++++++++ src/plugins/devCompanion.dev.tsx | 260 ------- src/plugins/devCompanion.dev/index.tsx | 260 +++++++ src/plugins/disableDMCallIdle.ts | 35 - src/plugins/disableDMCallIdle/index.ts | 35 + src/plugins/emoteCloner.tsx | 373 ---------- src/plugins/emoteCloner/index.tsx | 373 ++++++++++ src/plugins/experiments.tsx | 137 ---- src/plugins/experiments/index.tsx | 137 ++++ src/plugins/f8break.ts | 42 -- src/plugins/f8break/index.ts | 42 ++ src/plugins/fakeNitro.ts | 811 ---------------------- src/plugins/fakeNitro/index.ts | 811 ++++++++++++++++++++++ src/plugins/fakeProfileThemes.tsx | 145 ---- src/plugins/fakeProfileThemes/index.tsx | 145 ++++ src/plugins/fixSpotifyEmbeds.desktop.ts | 26 - src/plugins/fixSpotifyEmbeds.desktop/index.ts | 26 + src/plugins/forceOwnerCrown.ts | 58 -- src/plugins/forceOwnerCrown/index.ts | 58 ++ src/plugins/friendInvites.ts | 121 ---- src/plugins/friendInvites/index.ts | 121 ++++ src/plugins/gifPaste.ts | 47 -- src/plugins/gifPaste/index.ts | 47 ++ src/plugins/greetStickerPicker.tsx | 188 ----- src/plugins/greetStickerPicker/index.tsx | 188 +++++ src/plugins/hideAttachments.tsx | 95 --- src/plugins/hideAttachments/index.tsx | 95 +++ src/plugins/iLoveSpam.ts | 35 - src/plugins/iLoveSpam/index.ts | 35 + src/plugins/ignoreActivities.tsx | 233 ------- src/plugins/ignoreActivities/index.tsx | 233 +++++++ src/plugins/keepCurrentChannel.ts | 90 --- src/plugins/keepCurrentChannel/index.ts | 90 +++ src/plugins/lastfm.tsx | 337 --------- src/plugins/lastfm/index.tsx | 337 +++++++++ src/plugins/loadingQuotes.ts | 86 --- src/plugins/loadingQuotes/index.ts | 86 +++ src/plugins/memberCount.tsx | 116 ---- src/plugins/memberCount/index.tsx | 116 ++++ src/plugins/messageClickActions.ts | 113 --- src/plugins/messageClickActions/index.ts | 113 +++ src/plugins/messageLinkEmbeds.tsx | 402 ----------- src/plugins/messageLinkEmbeds/index.tsx | 402 +++++++++++ src/plugins/messageTags.ts | 249 ------- src/plugins/messageTags/index.ts | 249 +++++++ src/plugins/moreCommands.ts | 66 -- src/plugins/moreCommands/index.ts | 66 ++ src/plugins/moreKaomoji.ts | 48 -- src/plugins/moreKaomoji/index.ts | 48 ++ src/plugins/moreUserTags.tsx | 383 ---------- src/plugins/moreUserTags/index.tsx | 383 ++++++++++ src/plugins/moyai.ts | 177 ----- src/plugins/moyai/index.ts | 177 +++++ src/plugins/muteNewGuild.tsx | 74 -- src/plugins/muteNewGuild/index.tsx | 74 ++ src/plugins/mutualGroupDMs.tsx | 103 --- src/plugins/mutualGroupDMs/index.tsx | 103 +++ src/plugins/noBlockedMessages.ts | 64 -- src/plugins/noBlockedMessages/index.ts | 64 ++ src/plugins/noDevtoolsWarning.ts | 33 - src/plugins/noDevtoolsWarning/index.ts | 33 + src/plugins/noF1.ts | 35 - src/plugins/noF1/index.ts | 35 + src/plugins/noPendingCount.ts | 96 --- src/plugins/noPendingCount/index.ts | 96 +++ src/plugins/noProfileThemes.ts | 53 -- src/plugins/noProfileThemes/index.ts | 53 ++ src/plugins/noRPC.discordDesktop.ts | 35 - src/plugins/noRPC.discordDesktop/index.ts | 35 + src/plugins/noReplyMention.tsx | 74 -- src/plugins/noReplyMention/index.tsx | 74 ++ src/plugins/noScreensharePreview.ts | 38 - src/plugins/noScreensharePreview/index.ts | 38 + src/plugins/noSystemBadge.discordDesktop.ts | 41 -- src/plugins/noSystemBadge.discordDesktop/index.ts | 41 ++ src/plugins/noUnblockToJump.ts | 50 -- src/plugins/noUnblockToJump/index.ts | 50 ++ src/plugins/nsfwGateBypass.ts | 35 - src/plugins/nsfwGateBypass/index.ts | 35 + src/plugins/oneko.ts | 40 -- src/plugins/oneko/index.ts | 40 ++ src/plugins/openInApp.ts | 147 ---- src/plugins/openInApp/index.ts | 147 ++++ src/plugins/partyMode.ts | 105 --- src/plugins/partyMode/index.ts | 105 +++ src/plugins/petpet.ts | 182 ----- src/plugins/petpet/index.ts | 182 +++++ src/plugins/pictureInPicture.tsx | 83 --- src/plugins/pictureInPicture/index.tsx | 83 +++ src/plugins/plainFolderIcon.ts | 33 - src/plugins/plainFolderIcon/index.ts | 33 + src/plugins/platformIndicators.tsx | 261 ------- src/plugins/platformIndicators/index.tsx | 261 +++++++ src/plugins/quickMention.tsx | 59 -- src/plugins/quickMention/index.tsx | 59 ++ src/plugins/quickReply.ts | 216 ------ src/plugins/quickReply/index.ts | 216 ++++++ src/plugins/reactErrorDecoder.ts | 59 -- src/plugins/reactErrorDecoder/index.ts | 59 ++ src/plugins/readAllNotificationsButton.tsx | 71 -- src/plugins/readAllNotificationsButton/index.tsx | 71 ++ src/plugins/revealAllSpoilers.ts | 58 -- src/plugins/revealAllSpoilers/index.ts | 58 ++ src/plugins/reverseImageSearch.tsx | 120 ---- src/plugins/reverseImageSearch/index.tsx | 120 ++++ src/plugins/roleColorEverywhere.tsx | 126 ---- src/plugins/roleColorEverywhere/index.tsx | 126 ++++ src/plugins/secretRingTone.ts | 35 - src/plugins/secretRingTone/index.ts | 35 + src/plugins/serverListIndicators.tsx | 137 ---- src/plugins/serverListIndicators/index.tsx | 137 ++++ src/plugins/showAllMessageButtons.ts | 37 - src/plugins/showAllMessageButtons/index.ts | 37 + src/plugins/showTimeouts.ts | 35 - src/plugins/showTimeouts/index.ts | 35 + src/plugins/silentMessageToggle.tsx | 120 ---- src/plugins/silentMessageToggle/index.tsx | 120 ++++ src/plugins/silentTyping.tsx | 124 ---- src/plugins/silentTyping/index.tsx | 124 ++++ src/plugins/sortFriendRequests.tsx | 74 -- src/plugins/sortFriendRequests/index.tsx | 74 ++ src/plugins/spotifyCrack.ts | 69 -- src/plugins/spotifyCrack/index.ts | 69 ++ src/plugins/spotifyShareCommands.ts | 138 ---- src/plugins/spotifyShareCommands/index.ts | 138 ++++ src/plugins/textReplace.tsx | 267 ------- src/plugins/textReplace/index.tsx | 267 +++++++ src/plugins/timeBarAllActivities.ts | 35 - src/plugins/timeBarAllActivities/index.ts | 35 + src/plugins/typingIndicator.tsx | 140 ---- src/plugins/typingIndicator/index.tsx | 140 ++++ src/plugins/typingTweaks.tsx | 139 ---- src/plugins/typingTweaks/index.tsx | 139 ++++ src/plugins/unindent.ts | 67 -- src/plugins/unindent/index.ts | 67 ++ src/plugins/unsuppressEmbeds.tsx | 67 -- src/plugins/unsuppressEmbeds/index.tsx | 67 ++ src/plugins/urbanDictionary.ts | 91 --- src/plugins/urbanDictionary/index.ts | 91 +++ src/plugins/validUser.tsx | 144 ---- src/plugins/validUser/index.tsx | 144 ++++ src/plugins/vcDoubleClick.ts | 86 --- src/plugins/vcDoubleClick/index.ts | 86 +++ src/plugins/vcNarrator.tsx | 341 --------- src/plugins/vcNarrator/index.tsx | 341 +++++++++ src/plugins/viewIcons.tsx | 200 ------ src/plugins/viewIcons/index.tsx | 200 ++++++ src/plugins/viewRaw.tsx | 198 ------ src/plugins/viewRaw/index.tsx | 198 ++++++ src/plugins/volumeBooster.discordDesktop.ts | 86 --- src/plugins/volumeBooster.discordDesktop/index.ts | 86 +++ src/plugins/webContextMenus.web.ts | 232 ------- src/plugins/webContextMenus.web/index.ts | 232 +++++++ src/plugins/webKeybinds.vencordDesktop.ts | 79 --- src/plugins/webKeybinds.vencordDesktop/index.ts | 79 +++ src/plugins/whoReacted.tsx | 262 ------- src/plugins/whoReacted/index.tsx | 262 +++++++ src/plugins/wikisearch.ts | 110 --- src/plugins/wikisearch/index.ts | 110 +++ 190 files changed, 11826 insertions(+), 11826 deletions(-) delete mode 100644 src/plugins/alwaysAnimate.ts create mode 100644 src/plugins/alwaysAnimate/index.ts delete mode 100644 src/plugins/alwaysTrust.ts create mode 100644 src/plugins/alwaysTrust/index.ts delete mode 100644 src/plugins/anonymiseFileNames.ts create mode 100644 src/plugins/anonymiseFileNames/index.ts delete mode 100644 src/plugins/arRPC.web.tsx create mode 100644 src/plugins/arRPC.web/index.tsx delete mode 100644 src/plugins/banger.ts create mode 100644 src/plugins/banger/index.ts delete mode 100644 src/plugins/betterGifAltText.ts create mode 100644 src/plugins/betterGifAltText/index.ts delete mode 100644 src/plugins/betterNotes.ts create mode 100644 src/plugins/betterNotes/index.ts delete mode 100644 src/plugins/betterRoleDot.ts create mode 100644 src/plugins/betterRoleDot/index.ts delete mode 100644 src/plugins/betterUploadButton.ts create mode 100644 src/plugins/betterUploadButton/index.ts delete mode 100644 src/plugins/blurNsfw.ts create mode 100644 src/plugins/blurNsfw/index.ts delete mode 100644 src/plugins/callTimer.tsx create mode 100644 src/plugins/callTimer/index.tsx delete mode 100644 src/plugins/colorSighted.ts create mode 100644 src/plugins/colorSighted/index.ts delete mode 100644 src/plugins/consoleShortcuts.ts create mode 100644 src/plugins/consoleShortcuts/index.ts delete mode 100644 src/plugins/copyUserURLs.tsx create mode 100644 src/plugins/copyUserURLs/index.tsx delete mode 100644 src/plugins/crashHandler.ts create mode 100644 src/plugins/crashHandler/index.ts delete mode 100644 src/plugins/customRPC.tsx create mode 100644 src/plugins/customRPC/index.tsx delete mode 100644 src/plugins/devCompanion.dev.tsx create mode 100644 src/plugins/devCompanion.dev/index.tsx delete mode 100644 src/plugins/disableDMCallIdle.ts create mode 100644 src/plugins/disableDMCallIdle/index.ts delete mode 100644 src/plugins/emoteCloner.tsx create mode 100644 src/plugins/emoteCloner/index.tsx delete mode 100644 src/plugins/experiments.tsx create mode 100644 src/plugins/experiments/index.tsx delete mode 100644 src/plugins/f8break.ts create mode 100644 src/plugins/f8break/index.ts delete mode 100644 src/plugins/fakeNitro.ts create mode 100644 src/plugins/fakeNitro/index.ts delete mode 100644 src/plugins/fakeProfileThemes.tsx create mode 100644 src/plugins/fakeProfileThemes/index.tsx delete mode 100644 src/plugins/fixSpotifyEmbeds.desktop.ts create mode 100644 src/plugins/fixSpotifyEmbeds.desktop/index.ts delete mode 100644 src/plugins/forceOwnerCrown.ts create mode 100644 src/plugins/forceOwnerCrown/index.ts delete mode 100644 src/plugins/friendInvites.ts create mode 100644 src/plugins/friendInvites/index.ts delete mode 100644 src/plugins/gifPaste.ts create mode 100644 src/plugins/gifPaste/index.ts delete mode 100644 src/plugins/greetStickerPicker.tsx create mode 100644 src/plugins/greetStickerPicker/index.tsx delete mode 100644 src/plugins/hideAttachments.tsx create mode 100644 src/plugins/hideAttachments/index.tsx delete mode 100644 src/plugins/iLoveSpam.ts create mode 100644 src/plugins/iLoveSpam/index.ts delete mode 100644 src/plugins/ignoreActivities.tsx create mode 100644 src/plugins/ignoreActivities/index.tsx delete mode 100644 src/plugins/keepCurrentChannel.ts create mode 100644 src/plugins/keepCurrentChannel/index.ts delete mode 100644 src/plugins/lastfm.tsx create mode 100644 src/plugins/lastfm/index.tsx delete mode 100644 src/plugins/loadingQuotes.ts create mode 100644 src/plugins/loadingQuotes/index.ts delete mode 100644 src/plugins/memberCount.tsx create mode 100644 src/plugins/memberCount/index.tsx delete mode 100644 src/plugins/messageClickActions.ts create mode 100644 src/plugins/messageClickActions/index.ts delete mode 100644 src/plugins/messageLinkEmbeds.tsx create mode 100644 src/plugins/messageLinkEmbeds/index.tsx delete mode 100644 src/plugins/messageTags.ts create mode 100644 src/plugins/messageTags/index.ts delete mode 100644 src/plugins/moreCommands.ts create mode 100644 src/plugins/moreCommands/index.ts delete mode 100644 src/plugins/moreKaomoji.ts create mode 100644 src/plugins/moreKaomoji/index.ts delete mode 100644 src/plugins/moreUserTags.tsx create mode 100644 src/plugins/moreUserTags/index.tsx delete mode 100644 src/plugins/moyai.ts create mode 100644 src/plugins/moyai/index.ts delete mode 100644 src/plugins/muteNewGuild.tsx create mode 100644 src/plugins/muteNewGuild/index.tsx delete mode 100644 src/plugins/mutualGroupDMs.tsx create mode 100644 src/plugins/mutualGroupDMs/index.tsx delete mode 100644 src/plugins/noBlockedMessages.ts create mode 100644 src/plugins/noBlockedMessages/index.ts delete mode 100644 src/plugins/noDevtoolsWarning.ts create mode 100644 src/plugins/noDevtoolsWarning/index.ts delete mode 100644 src/plugins/noF1.ts create mode 100644 src/plugins/noF1/index.ts delete mode 100644 src/plugins/noPendingCount.ts create mode 100644 src/plugins/noPendingCount/index.ts delete mode 100644 src/plugins/noProfileThemes.ts create mode 100644 src/plugins/noProfileThemes/index.ts delete mode 100644 src/plugins/noRPC.discordDesktop.ts create mode 100644 src/plugins/noRPC.discordDesktop/index.ts delete mode 100644 src/plugins/noReplyMention.tsx create mode 100644 src/plugins/noReplyMention/index.tsx delete mode 100644 src/plugins/noScreensharePreview.ts create mode 100644 src/plugins/noScreensharePreview/index.ts delete mode 100644 src/plugins/noSystemBadge.discordDesktop.ts create mode 100644 src/plugins/noSystemBadge.discordDesktop/index.ts delete mode 100644 src/plugins/noUnblockToJump.ts create mode 100644 src/plugins/noUnblockToJump/index.ts delete mode 100644 src/plugins/nsfwGateBypass.ts create mode 100644 src/plugins/nsfwGateBypass/index.ts delete mode 100644 src/plugins/oneko.ts create mode 100644 src/plugins/oneko/index.ts delete mode 100644 src/plugins/openInApp.ts create mode 100644 src/plugins/openInApp/index.ts delete mode 100644 src/plugins/partyMode.ts create mode 100644 src/plugins/partyMode/index.ts delete mode 100644 src/plugins/petpet.ts create mode 100644 src/plugins/petpet/index.ts delete mode 100644 src/plugins/pictureInPicture.tsx create mode 100644 src/plugins/pictureInPicture/index.tsx delete mode 100644 src/plugins/plainFolderIcon.ts create mode 100644 src/plugins/plainFolderIcon/index.ts delete mode 100644 src/plugins/platformIndicators.tsx create mode 100644 src/plugins/platformIndicators/index.tsx delete mode 100644 src/plugins/quickMention.tsx create mode 100644 src/plugins/quickMention/index.tsx delete mode 100644 src/plugins/quickReply.ts create mode 100644 src/plugins/quickReply/index.ts delete mode 100644 src/plugins/reactErrorDecoder.ts create mode 100644 src/plugins/reactErrorDecoder/index.ts delete mode 100644 src/plugins/readAllNotificationsButton.tsx create mode 100644 src/plugins/readAllNotificationsButton/index.tsx delete mode 100644 src/plugins/revealAllSpoilers.ts create mode 100644 src/plugins/revealAllSpoilers/index.ts delete mode 100644 src/plugins/reverseImageSearch.tsx create mode 100644 src/plugins/reverseImageSearch/index.tsx delete mode 100644 src/plugins/roleColorEverywhere.tsx create mode 100644 src/plugins/roleColorEverywhere/index.tsx delete mode 100644 src/plugins/secretRingTone.ts create mode 100644 src/plugins/secretRingTone/index.ts delete mode 100644 src/plugins/serverListIndicators.tsx create mode 100644 src/plugins/serverListIndicators/index.tsx delete mode 100644 src/plugins/showAllMessageButtons.ts create mode 100644 src/plugins/showAllMessageButtons/index.ts delete mode 100644 src/plugins/showTimeouts.ts create mode 100644 src/plugins/showTimeouts/index.ts delete mode 100644 src/plugins/silentMessageToggle.tsx create mode 100644 src/plugins/silentMessageToggle/index.tsx delete mode 100644 src/plugins/silentTyping.tsx create mode 100644 src/plugins/silentTyping/index.tsx delete mode 100644 src/plugins/sortFriendRequests.tsx create mode 100644 src/plugins/sortFriendRequests/index.tsx delete mode 100644 src/plugins/spotifyCrack.ts create mode 100644 src/plugins/spotifyCrack/index.ts delete mode 100644 src/plugins/spotifyShareCommands.ts create mode 100644 src/plugins/spotifyShareCommands/index.ts delete mode 100644 src/plugins/textReplace.tsx create mode 100644 src/plugins/textReplace/index.tsx delete mode 100644 src/plugins/timeBarAllActivities.ts create mode 100644 src/plugins/timeBarAllActivities/index.ts delete mode 100644 src/plugins/typingIndicator.tsx create mode 100644 src/plugins/typingIndicator/index.tsx delete mode 100644 src/plugins/typingTweaks.tsx create mode 100644 src/plugins/typingTweaks/index.tsx delete mode 100644 src/plugins/unindent.ts create mode 100644 src/plugins/unindent/index.ts delete mode 100644 src/plugins/unsuppressEmbeds.tsx create mode 100644 src/plugins/unsuppressEmbeds/index.tsx delete mode 100644 src/plugins/urbanDictionary.ts create mode 100644 src/plugins/urbanDictionary/index.ts delete mode 100644 src/plugins/validUser.tsx create mode 100644 src/plugins/validUser/index.tsx delete mode 100644 src/plugins/vcDoubleClick.ts create mode 100644 src/plugins/vcDoubleClick/index.ts delete mode 100644 src/plugins/vcNarrator.tsx create mode 100644 src/plugins/vcNarrator/index.tsx delete mode 100644 src/plugins/viewIcons.tsx create mode 100644 src/plugins/viewIcons/index.tsx delete mode 100644 src/plugins/viewRaw.tsx create mode 100644 src/plugins/viewRaw/index.tsx delete mode 100644 src/plugins/volumeBooster.discordDesktop.ts create mode 100644 src/plugins/volumeBooster.discordDesktop/index.ts delete mode 100644 src/plugins/webContextMenus.web.ts create mode 100644 src/plugins/webContextMenus.web/index.ts delete mode 100644 src/plugins/webKeybinds.vencordDesktop.ts create mode 100644 src/plugins/webKeybinds.vencordDesktop/index.ts delete mode 100644 src/plugins/whoReacted.tsx create mode 100644 src/plugins/whoReacted/index.tsx delete mode 100644 src/plugins/wikisearch.ts create mode 100644 src/plugins/wikisearch/index.ts (limited to 'src/plugins') diff --git a/src/plugins/alwaysAnimate.ts b/src/plugins/alwaysAnimate.ts deleted file mode 100644 index f3ae27a..0000000 --- a/src/plugins/alwaysAnimate.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2023 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { Devs } from "@utils/constants"; -import definePlugin from "@utils/types"; - -export default definePlugin({ - name: "AlwaysAnimate", - description: "Animates anything that can be animated, besides status emojis.", - authors: [Devs.FieryFlames], - - patches: [ - { - find: ".canAnimate", - all: true, - replacement: { - match: /\.canAnimate\b/g, - replace: ".canAnimate || true" - } - } - ] -}); diff --git a/src/plugins/alwaysAnimate/index.ts b/src/plugins/alwaysAnimate/index.ts new file mode 100644 index 0000000..f3ae27a --- /dev/null +++ b/src/plugins/alwaysAnimate/index.ts @@ -0,0 +1,37 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2023 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +export default definePlugin({ + name: "AlwaysAnimate", + description: "Animates anything that can be animated, besides status emojis.", + authors: [Devs.FieryFlames], + + patches: [ + { + find: ".canAnimate", + all: true, + replacement: { + match: /\.canAnimate\b/g, + replace: ".canAnimate || true" + } + } + ] +}); diff --git a/src/plugins/alwaysTrust.ts b/src/plugins/alwaysTrust.ts deleted file mode 100644 index 79193b0..0000000 --- a/src/plugins/alwaysTrust.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2023 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { Devs } from "@utils/constants"; -import definePlugin from "@utils/types"; - -export default definePlugin({ - name: "AlwaysTrust", - description: "Removes the annoying untrusted domain and suspicious file popup", - authors: [Devs.zt], - patches: [ - { - find: ".displayName=\"MaskedLinkStore\"", - replacement: { - match: /\.isTrustedDomain=function\(.\){return.+?};/, - replace: ".isTrustedDomain=function(){return true};" - } - }, - { - find: '"7z","ade","adp"', - replacement: { - match: /JSON\.parse\('\[.+?'\)/, - replace: "[]" - } - } - ] -}); diff --git a/src/plugins/alwaysTrust/index.ts b/src/plugins/alwaysTrust/index.ts new file mode 100644 index 0000000..79193b0 --- /dev/null +++ b/src/plugins/alwaysTrust/index.ts @@ -0,0 +1,42 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2023 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +export default definePlugin({ + name: "AlwaysTrust", + description: "Removes the annoying untrusted domain and suspicious file popup", + authors: [Devs.zt], + patches: [ + { + find: ".displayName=\"MaskedLinkStore\"", + replacement: { + match: /\.isTrustedDomain=function\(.\){return.+?};/, + replace: ".isTrustedDomain=function(){return true};" + } + }, + { + find: '"7z","ade","adp"', + replacement: { + match: /JSON\.parse\('\[.+?'\)/, + replace: "[]" + } + } + ] +}); diff --git a/src/plugins/anonymiseFileNames.ts b/src/plugins/anonymiseFileNames.ts deleted file mode 100644 index 9e69d7a..0000000 --- a/src/plugins/anonymiseFileNames.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { Settings } from "@api/Settings"; -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; - -const enum Methods { - Random, - Consistent, - Timestamp, -} - -const tarExtMatcher = /\.tar\.\w+$/; - -export default definePlugin({ - name: "AnonymiseFileNames", - authors: [Devs.obscurity], - description: "Anonymise uploaded file names", - patches: [ - { - find: "instantBatchUpload:function", - replacement: { - match: /uploadFiles:(.{1,2}),/, - replace: - "uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),", - }, - }, - ], - - options: { - method: { - description: "Anonymising method", - type: OptionType.SELECT, - options: [ - { label: "Random Characters", value: Methods.Random, default: true }, - { label: "Consistent", value: Methods.Consistent }, - { label: "Timestamp (4chan-like)", value: Methods.Timestamp }, - ], - }, - randomisedLength: { - description: "Random characters length", - type: OptionType.NUMBER, - default: 7, - disabled: () => Settings.plugins.AnonymiseFileNames.method !== Methods.Random, - }, - consistent: { - description: "Consistent filename", - type: OptionType.STRING, - default: "image", - disabled: () => Settings.plugins.AnonymiseFileNames.method !== Methods.Consistent, - }, - }, - - anonymise(file: string) { - let name = "image"; - const tarMatch = tarExtMatcher.exec(file); - const extIdx = tarMatch?.index ?? file.lastIndexOf("."); - const ext = extIdx !== -1 ? file.slice(extIdx) : ""; - - switch (Settings.plugins.AnonymiseFileNames.method) { - case Methods.Random: - const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - name = Array.from( - { length: Settings.plugins.AnonymiseFileNames.randomisedLength }, - () => chars[Math.floor(Math.random() * chars.length)] - ).join(""); - break; - case Methods.Consistent: - name = Settings.plugins.AnonymiseFileNames.consistent; - break; - case Methods.Timestamp: - // UNIX timestamp in nanos, i could not find a better dependency-less way - name = `${Math.floor(Date.now() / 1000)}${Math.floor(window.performance.now())}`; - break; - } - return name + ext; - }, -}); diff --git a/src/plugins/anonymiseFileNames/index.ts b/src/plugins/anonymiseFileNames/index.ts new file mode 100644 index 0000000..9e69d7a --- /dev/null +++ b/src/plugins/anonymiseFileNames/index.ts @@ -0,0 +1,94 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { Settings } from "@api/Settings"; +import { Devs } from "@utils/constants"; +import definePlugin, { OptionType } from "@utils/types"; + +const enum Methods { + Random, + Consistent, + Timestamp, +} + +const tarExtMatcher = /\.tar\.\w+$/; + +export default definePlugin({ + name: "AnonymiseFileNames", + authors: [Devs.obscurity], + description: "Anonymise uploaded file names", + patches: [ + { + find: "instantBatchUpload:function", + replacement: { + match: /uploadFiles:(.{1,2}),/, + replace: + "uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),", + }, + }, + ], + + options: { + method: { + description: "Anonymising method", + type: OptionType.SELECT, + options: [ + { label: "Random Characters", value: Methods.Random, default: true }, + { label: "Consistent", value: Methods.Consistent }, + { label: "Timestamp (4chan-like)", value: Methods.Timestamp }, + ], + }, + randomisedLength: { + description: "Random characters length", + type: OptionType.NUMBER, + default: 7, + disabled: () => Settings.plugins.AnonymiseFileNames.method !== Methods.Random, + }, + consistent: { + description: "Consistent filename", + type: OptionType.STRING, + default: "image", + disabled: () => Settings.plugins.AnonymiseFileNames.method !== Methods.Consistent, + }, + }, + + anonymise(file: string) { + let name = "image"; + const tarMatch = tarExtMatcher.exec(file); + const extIdx = tarMatch?.index ?? file.lastIndexOf("."); + const ext = extIdx !== -1 ? file.slice(extIdx) : ""; + + switch (Settings.plugins.AnonymiseFileNames.method) { + case Methods.Random: + const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + name = Array.from( + { length: Settings.plugins.AnonymiseFileNames.randomisedLength }, + () => chars[Math.floor(Math.random() * chars.length)] + ).join(""); + break; + case Methods.Consistent: + name = Settings.plugins.AnonymiseFileNames.consistent; + break; + case Methods.Timestamp: + // UNIX timestamp in nanos, i could not find a better dependency-less way + name = `${Math.floor(Date.now() / 1000)}${Math.floor(window.performance.now())}`; + break; + } + return name + ext; + }, +}); diff --git a/src/plugins/arRPC.web.tsx b/src/plugins/arRPC.web.tsx deleted file mode 100644 index f0d4841..0000000 --- a/src/plugins/arRPC.web.tsx +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 OpenAsar - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { popNotice, showNotice } from "@api/Notices"; -import { Link } from "@components/Link"; -import { Devs } from "@utils/constants"; -import definePlugin from "@utils/types"; -import { filters, findByCodeLazy, mapMangledModuleLazy } from "@webpack"; -import { FluxDispatcher, Forms, Toasts } from "@webpack/common"; - -const assetManager = mapMangledModuleLazy( - "getAssetImage: size must === [number, number] for Twitch", - { - getAsset: filters.byCode("apply("), - } -); - -const lookupRpcApp = findByCodeLazy(".APPLICATION_RPC("); - -async function lookupAsset(applicationId: string, key: string): Promise { - return (await assetManager.getAsset(applicationId, [key, undefined]))[0]; -} - -const apps: any = {}; -async function lookupApp(applicationId: string): Promise { - const socket: any = {}; - await lookupRpcApp(socket, applicationId); - return socket.application; -} - -let ws: WebSocket; -export default definePlugin({ - name: "WebRichPresence (arRPC)", - description: "Client plugin for arRPC to enable RPC on Discord Web (experimental)", - authors: [Devs.Ducko], - - settingsAboutComponent: () => ( - <> - How to use arRPC - - Follow the instructions in the GitHub repo to get the server running, and then enable the plugin. - - - ), - - async start() { - // ArmCord comes with its own arRPC implementation, so this plugin just confuses users - if ("armcord" in window) return; - - if (ws) ws.close(); - ws = new WebSocket("ws://127.0.0.1:1337"); // try to open WebSocket - - ws.onmessage = async e => { // on message, set status to data - const data = JSON.parse(e.data); - - if (data.activity?.assets?.large_image) data.activity.assets.large_image = await lookupAsset(data.activity.application_id, data.activity.assets.large_image); - if (data.activity?.assets?.small_image) data.activity.assets.small_image = await lookupAsset(data.activity.application_id, data.activity.assets.small_image); - - if (data.activity) { - const appId = data.activity.application_id; - apps[appId] ||= await lookupApp(appId); - - const app = apps[appId]; - data.activity.name ||= app.name; - } - - FluxDispatcher.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", ...data }); - }; - - const connectionSuccessful = await new Promise(res => setTimeout(() => res(ws.readyState === WebSocket.OPEN), 1000)); // check if open after 1s - if (!connectionSuccessful) { - showNotice("Failed to connect to arRPC, is it running?", "Retry", () => { // show notice about failure to connect, with retry/ignore - popNotice(); - this.start(); - }); - return; - } - - Toasts.show({ // show toast on success - message: "Connected to arRPC", - type: Toasts.Type.SUCCESS, - id: Toasts.genId(), - options: { - duration: 1000, - position: Toasts.Position.BOTTOM - } - }); - }, - - stop() { - FluxDispatcher.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", activity: null }); // clear status - ws?.close(); // close WebSocket - } -}); diff --git a/src/plugins/arRPC.web/index.tsx b/src/plugins/arRPC.web/index.tsx new file mode 100644 index 0000000..f0d4841 --- /dev/null +++ b/src/plugins/arRPC.web/index.tsx @@ -0,0 +1,109 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 OpenAsar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { popNotice, showNotice } from "@api/Notices"; +import { Link } from "@components/Link"; +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; +import { filters, findByCodeLazy, mapMangledModuleLazy } from "@webpack"; +import { FluxDispatcher, Forms, Toasts } from "@webpack/common"; + +const assetManager = mapMangledModuleLazy( + "getAssetImage: size must === [number, number] for Twitch", + { + getAsset: filters.byCode("apply("), + } +); + +const lookupRpcApp = findByCodeLazy(".APPLICATION_RPC("); + +async function lookupAsset(applicationId: string, key: string): Promise { + return (await assetManager.getAsset(applicationId, [key, undefined]))[0]; +} + +const apps: any = {}; +async function lookupApp(applicationId: string): Promise { + const socket: any = {}; + await lookupRpcApp(socket, applicationId); + return socket.application; +} + +let ws: WebSocket; +export default definePlugin({ + name: "WebRichPresence (arRPC)", + description: "Client plugin for arRPC to enable RPC on Discord Web (experimental)", + authors: [Devs.Ducko], + + settingsAboutComponent: () => ( + <> + How to use arRPC + + Follow the instructions in the GitHub repo to get the server running, and then enable the plugin. + + + ), + + async start() { + // ArmCord comes with its own arRPC implementation, so this plugin just confuses users + if ("armcord" in window) return; + + if (ws) ws.close(); + ws = new WebSocket("ws://127.0.0.1:1337"); // try to open WebSocket + + ws.onmessage = async e => { // on message, set status to data + const data = JSON.parse(e.data); + + if (data.activity?.assets?.large_image) data.activity.assets.large_image = await lookupAsset(data.activity.application_id, data.activity.assets.large_image); + if (data.activity?.assets?.small_image) data.activity.assets.small_image = await lookupAsset(data.activity.application_id, data.activity.assets.small_image); + + if (data.activity) { + const appId = data.activity.application_id; + apps[appId] ||= await lookupApp(appId); + + const app = apps[appId]; + data.activity.name ||= app.name; + } + + FluxDispatcher.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", ...data }); + }; + + const connectionSuccessful = await new Promise(res => setTimeout(() => res(ws.readyState === WebSocket.OPEN), 1000)); // check if open after 1s + if (!connectionSuccessful) { + showNotice("Failed to connect to arRPC, is it running?", "Retry", () => { // show notice about failure to connect, with retry/ignore + popNotice(); + this.start(); + }); + return; + } + + Toasts.show({ // show toast on success + message: "Connected to arRPC", + type: Toasts.Type.SUCCESS, + id: Toasts.genId(), + options: { + duration: 1000, + position: Toasts.Position.BOTTOM + } + }); + }, + + stop() { + FluxDispatcher.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", activity: null }); // clear status + ws?.close(); // close WebSocket + } +}); diff --git a/src/plugins/banger.ts b/src/plugins/banger.ts deleted file mode 100644 index 68163cb..0000000 --- a/src/plugins/banger.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; - -export default definePlugin({ - name: "BANger", - description: "Replaces the GIF in the ban dialogue with a custom one.", - authors: [Devs.Xinto, Devs.Glitch], - patches: [ - { - find: "BAN_CONFIRM_TITLE.", - replacement: { - match: /src:\w\(\d+\)/g, - replace: "src: Vencord.Settings.plugins.BANger.source" - } - } - ], - options: { - source: { - description: "Source to replace ban GIF with (Video or Gif)", - type: OptionType.STRING, - default: "https://i.imgur.com/wp5q52C.mp4", - restartNeeded: true, - } - } -}); diff --git a/src/plugins/banger/index.ts b/src/plugins/banger/index.ts new file mode 100644 index 0000000..68163cb --- /dev/null +++ b/src/plugins/banger/index.ts @@ -0,0 +1,43 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { Devs } from "@utils/constants"; +import definePlugin, { OptionType } from "@utils/types"; + +export default definePlugin({ + name: "BANger", + description: "Replaces the GIF in the ban dialogue with a custom one.", + authors: [Devs.Xinto, Devs.Glitch], + patches: [ + { + find: "BAN_CONFIRM_TITLE.", + replacement: { + match: /src:\w\(\d+\)/g, + replace: "src: Vencord.Settings.plugins.BANger.source" + } + } + ], + options: { + source: { + description: "Source to replace ban GIF with (Video or Gif)", + type: OptionType.STRING, + default: "https://i.imgur.com/wp5q52C.mp4", + restartNeeded: true, + } + } +}); diff --git a/src/plugins/betterGifAltText.ts b/src/plugins/betterGifAltText.ts deleted file mode 100644 index 4dd30f2..0000000 --- a/src/plugins/betterGifAltText.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { Devs } from "@utils/constants"; -import definePlugin from "@utils/types"; - -export default definePlugin({ - name: "BetterGifAltText", - authors: [Devs.Ven], - description: - "Change GIF alt text from simply being 'GIF' to containing the gif tags / filename", - patches: [ - { - find: "onCloseImage=", - replacement: { - match: /(return.{0,10}\.jsx.{0,50}isWindowFocused)/, - replace: - "$self.altify(e);$1", - }, - }, - { - find: ".embedGallerySide", - replacement: { - match: /(?<==(.{1,3})\.alt.{0,20})\?.{0,5}\.Messages\.GIF/, - replace: - "?($1.alt='GIF',$self.altify($1))", - }, - }, - ], - - altify(props: any) { - if (props.alt !== "GIF") return props.alt; - - let url: string = props.original || props.src; - try { - url = decodeURI(url); - } catch { } - - let name = url - .slice(url.lastIndexOf("/") + 1) - .replace(/\d/g, "") // strip numbers - .replace(/.gif$/, "") // strip extension - .split(/[,\-_ ]+/g) - .slice(0, 20) - .join(" "); - if (name.length > 300) { - name = name.slice(0, 300) + "..."; - } - - if (name) props.alt += ` - ${name}`; - - return props.alt; - }, -}); diff --git a/src/plugins/betterGifAltText/index.ts b/src/plugins/betterGifAltText/index.ts new file mode 100644 index 0000000..4dd30f2 --- /dev/null +++ b/src/plugins/betterGifAltText/index.ts @@ -0,0 +1,69 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +export default definePlugin({ + name: "BetterGifAltText", + authors: [Devs.Ven], + description: + "Change GIF alt text from simply being 'GIF' to containing the gif tags / filename", + patches: [ + { + find: "onCloseImage=", + replacement: { + match: /(return.{0,10}\.jsx.{0,50}isWindowFocused)/, + replace: + "$self.altify(e);$1", + }, + }, + { + find: ".embedGallerySide", + replacement: { + match: /(?<==(.{1,3})\.alt.{0,20})\?.{0,5}\.Messages\.GIF/, + replace: + "?($1.alt='GIF',$self.altify($1))", + }, + }, + ], + + altify(props: any) { + if (props.alt !== "GIF") return props.alt; + + let url: string = props.original || props.src; + try { + url = decodeURI(url); + } catch { } + + let name = url + .slice(url.lastIndexOf("/") + 1) + .replace(/\d/g, "") // strip numbers + .replace(/.gif$/, "") // strip extension + .split(/[,\-_ ]+/g) + .slice(0, 20) + .join(" "); + if (name.length > 300) { + name = name.slice(0, 300) + "..."; + } + + if (name) props.alt += ` - ${name}`; + + return props.alt; + }, +}); diff --git a/src/plugins/betterNotes.ts b/src/plugins/betterNotes.ts deleted file mode 100644 index d9c5b45..0000000 --- a/src/plugins/betterNotes.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { Settings } from "@api/Settings"; -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; - -export default definePlugin({ - name: "BetterNotesBox", - description: "Hide notes or disable spellcheck (Configure in settings!!)", - authors: [Devs.Ven], - - patches: [ - { - find: "hideNote:", - all: true, - predicate: () => Vencord.Settings.plugins.BetterNotesBox.hide, - replacement: { - match: /hideNote:.+?(?=[,}])/g, - replace: "hideNote:true", - } - }, { - find: "Messages.NOTE_PLACEHOLDER", - replacement: { - match: /\.NOTE_PLACEHOLDER,/, - replace: "$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck," - } - } - ], - - options: { - hide: { - type: OptionType.BOOLEAN, - description: "Hide notes", - default: false, - restartNeeded: true - }, - noSpellCheck: { - type: OptionType.BOOLEAN, - description: "Disable spellcheck in notes", - disabled: () => Settings.plugins.BetterNotesBox.hide, - default: false - } - } -}); diff --git a/src/plugins/betterNotes/index.ts b/src/plugins/betterNotes/index.ts new file mode 100644 index 0000000..d9c5b45 --- /dev/null +++ b/src/plugins/betterNotes/index.ts @@ -0,0 +1,60 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { Settings } from "@api/Settings"; +import { Devs } from "@utils/constants"; +import definePlugin, { OptionType } from "@utils/types"; + +export default definePlugin({ + name: "BetterNotesBox", + description: "Hide notes or disable spellcheck (Configure in settings!!)", + authors: [Devs.Ven], + + patches: [ + { + find: "hideNote:", + all: true, + predicate: () => Vencord.Settings.plugins.BetterNotesBox.hide, + replacement: { + match: /hideNote:.+?(?=[,}])/g, + replace: "hideNote:true", + } + }, { + find: "Messages.NOTE_PLACEHOLDER", + replacement: { + match: /\.NOTE_PLACEHOLDER,/, + replace: "$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck," + } + } + ], + + options: { + hide: { + type: OptionType.BOOLEAN, + description: "Hide notes", + default: false, + restartNeeded: true + }, + noSpellCheck: { + type: OptionType.BOOLEAN, + description: "Disable spellcheck in notes", + disabled: () => Settings.plugins.BetterNotesBox.hide, + default: false + } + } +}); diff --git a/src/plugins/betterRoleDot.ts b/src/plugins/betterRoleDot.ts deleted file mode 100644 index e8f69b8..0000000 --- a/src/plugins/betterRoleDot.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import { Settings } from "@api/Settings"; -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; -import { Clipboard, Toasts } from "@webpack/common"; - -export default definePlugin({ - name: "BetterRoleDot", - authors: [Devs.Ven, Devs.AutumnVN], - description: - "Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously", - - patches: [ - { - find: ".dotBorderBase", - replacement: { - match: /,viewBox:"0 0 20 20"/, - replace: "$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}", - }, - }, - { - find: '"dot"===', - all: true, - predicate: () => Settings.plugins.BetterRoleDot.bothStyles, - replacement: { - match: /"(?:username|dot)"===\i(?!\.\i)/g, - replace: "true", - }, - }, - - { - find: ".ADD_ROLE_A11Y_LABEL", - predicate: () => Settings.plugins.BetterRoleDot.copyRoleColorInProfilePopout && !Settings.plugins.BetterRoleDot.bothStyles, - replacement: { - match: /"dot"===\i/, - replace: "true" - } - }, - { - find: ".roleVerifiedIcon", - predicate: () => Settings.plugins.BetterRoleDot.copyRoleColorInProfilePopout && !Settings.plugins.BetterRoleDot.bothStyles, - replacement: { - match: /"dot"===\i/, - replace: "true" - } - } - ], - - options: { - bothStyles: { - type: OptionType.BOOLEAN, - description: "Show both role dot and coloured names", - restartNeeded: true, - default: false, - }, - copyRoleColorInProfilePopout: { - type: OptionType.BOOLEAN, - description: "Allow click on role dot in profile popout to copy role color", - restartNeeded: true, - default: false - } - }, - - copyToClipBoard(color: string) { - Clipboard.copy(color); - Toasts.show({ - message: "Copied to Clipboard!", - type: Toasts.Type.SUCCESS, - id: Toasts.genId(), - options: { - duration: 1000, - position: Toasts.Position.BOTTOM - } - }); - }, -}); diff --git a/src/plugins/betterRoleDot/index.ts b/src/plugins/betterRoleDot/index.ts new file mode 100644 index 0000000..e8f69b8 --- /dev/null +++ b/src/plugins/betterRoleDot/index.ts @@ -0,0 +1,93 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { Settings } from "@api/Settings"; +import { Devs } from "@utils/constants"; +import definePlugin, { OptionType } from "@utils/types"; +import { Clipboard, Toasts } from "@webpack/common"; + +export default definePlugin({ + name: "BetterRoleDot", + authors: [Devs.Ven, Devs.AutumnVN], + description: + "Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously", + + patches: [ + { + find: ".dotBorderBase", + replacement: { + match: /,viewBox:"0 0 20 20"/, + replace: "$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}", + }, + }, + { + find: '"dot"===', + all: true, + predicate: () => Settings.plugins.BetterRoleDot.bothStyles, + replacement: { + match: /"(?:username|dot)"===\i(?!\.\i)/g, + replace: "true", + }, + }, + + { + find: ".ADD_ROLE_A11Y_LABEL", + predicate: () => Settings.plugins.BetterRoleDot.copyRoleColorInProfilePopout && !Settings.plugins.BetterRoleDot.bothStyles, + replacement: { + match: /"dot"===\i/, + replace: "true" + } + }, + { + find: ".roleVerifiedIcon", + predicate: () => Settings.plugins.BetterRoleDot.copyRoleColorInProfilePopout && !Settings.plugins.BetterRoleDot.bothStyles, + replacement: { + match: /"dot"===\i/, + replace: "true" + } + } + ], + + options: { + bothStyles: { + type: OptionType.BOOLEAN, + description: "Show both role dot and coloured names", + restartNeeded: true, + default: false, + }, + copyRoleColorInProfilePopout: { + type: OptionType.BOOLEAN, + description: "Allow click on role dot in profile popout to copy role color", + restartNeeded: true, + default: false + } + }, + + copyToClipBoard(color: string) { + Clipboard.copy(color); + Toasts.show({ + message: "Copied to Clipboard!", + type: Toasts.Type.SUCCESS, + id: Toasts.genId(), + options: { + duration: 1000, + position: Toasts.Position.BOTTOM + } + }); + }, +}); diff --git a/src/plugins/betterUploadButton.ts b/src/plugins/betterUploadButton.ts deleted file mode 100644 index 64a3785..0000000 --- a/src/plugins/betterUploadButton.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors - * - * This program is free softwa