Skip to content

Commit

Permalink
Added option to hide whispers
Browse files Browse the repository at this point in the history
  • Loading branch information
Excellify committed Jun 21, 2024
1 parent 229d8cb commit f58bca9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-nightly.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### 3.1.1 3000

- Added support for animated FFZ emotes
- Added option to hide whispers

### 3.1.1.2100

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ export const config = [
hint: "If checked, on-screen celebrations will be hidden",
defaultValue: false,
}),
declareConfig("layout.hide_whispers", "DROPDOWN", {
path: ["Site Layout", "Twitch Features"],
label: "Hide Whispers",
hint: "Choose when to hide whispers, fullscreen means when chat is hidden",
options: [
["Never", 0],
["Fullscreen", 1],
["Allways", 2],
],
defaultValue: 0,
}),
];
</script>

Expand Down Expand Up @@ -293,5 +304,17 @@ export const config = [
display: none !important;
}
}
.seventv-hide-whispers-fullscreen {
div.whispers-open-threads:not(.whispers--right-column-expanded-beside) {
display: none !important;
}
}
.seventv-hide-whispers-all {
div.whispers-open-threads {
display: none !important;
}
}
/* stylelint-enable */
</style>
6 changes: 4 additions & 2 deletions src/site/twitch.tv/modules/hidden-elements/hiddenElements.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Ref } from "vue";
import { Ref, computed } from "vue";
import { useConfig } from "@/composable/useSettings";

const hideLeaderboard = useConfig<boolean>("layout.hide_channel_leaderboard");
Expand All @@ -22,7 +22,7 @@ const hideChatInputBox = useConfig<boolean>("layout.hide_chat_input_box");
const hidePlayerExtensions = useConfig<boolean>("player.hide_player_extensions");
const hideChannelPointBalanceButton = useConfig<boolean>("layout.hide_channel_point_balance_button");
const hideOnscreenCelebrations = useConfig<boolean>("player.hide_onscreen_celebrations");

const hideWhispers = useConfig<number>("layout.hide_whispers");
export const hiddenElementSettings: Array<{ class: string; isHidden: Ref<boolean> }> = [
{ class: "seventv-hide-leaderboard", isHidden: hideLeaderboard },
{ class: "seventv-hide-buttons-below-chatbox", isHidden: hideButtonsBelowChatbox },
Expand All @@ -45,4 +45,6 @@ export const hiddenElementSettings: Array<{ class: string; isHidden: Ref<boolean
{ class: "seventv-hide-player-ext", isHidden: hidePlayerExtensions },
{ class: "seventv-hide-channel-point-balance-button", isHidden: hideChannelPointBalanceButton },
{ class: "seventv-hide-onscreen-celebrations", isHidden: hideOnscreenCelebrations },
{ class: "seventv-hide-whispers-fullscreen", isHidden: computed(() => hideWhispers.value === 1) },
{ class: "seventv-hide-whispers-all", isHidden: computed(() => hideWhispers.value === 2) },
];

0 comments on commit f58bca9

Please sign in to comment.