diff options
author | whqwert <94757998+whqwert@users.noreply.github.com> | 2023-06-04 15:22:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-04 17:22:21 -0300 |
commit | 55543d8640562fdcd673c7e73e0498d02cd4e328 (patch) | |
tree | 9a46898899367c83d9c02d29111061a67bc79586 /src/plugins/revealAllSpoilers.ts | |
parent | 263fbc377eb6444d97f21642fe5be41e30f0a3e4 (diff) | |
download | Vencord-55543d8640562fdcd673c7e73e0498d02cd4e328.tar.gz Vencord-55543d8640562fdcd673c7e73e0498d02cd4e328.tar.bz2 Vencord-55543d8640562fdcd673c7e73e0498d02cd4e328.zip |
Fix(RevealAllSpoilers): New spoiler class name (#1229)
Diffstat (limited to 'src/plugins/revealAllSpoilers.ts')
-rw-r--r-- | src/plugins/revealAllSpoilers.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/revealAllSpoilers.ts b/src/plugins/revealAllSpoilers.ts index 9cb7b6b..a120016 100644 --- a/src/plugins/revealAllSpoilers.ts +++ b/src/plugins/revealAllSpoilers.ts @@ -20,7 +20,7 @@ import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; import { findByPropsLazy } from "@webpack"; -const SpoilerClasses = findByPropsLazy("spoilerText"); +const SpoilerClasses = findByPropsLazy("spoilerContent"); const MessagesClasses = findByPropsLazy("messagesWrapper", "messages"); export default definePlugin({ @@ -43,14 +43,14 @@ export default definePlugin({ if (!ctrlKey) { return; } - const { spoilerText, hidden } = SpoilerClasses; + const { spoilerContent, hidden } = SpoilerClasses; const { messagesWrapper } = MessagesClasses; const parent = shiftKey ? document.querySelector(`div.${messagesWrapper}`) : (target as HTMLSpanElement).parentElement; - for (const spoiler of parent!.querySelectorAll(`span.${spoilerText}.${hidden}`)) { + for (const spoiler of parent!.querySelectorAll(`span.${spoilerContent}.${hidden}`)) { (spoiler as HTMLSpanElement).click(); } } |