Skip to content

Commit

Permalink
refactor: merge two animation disabling options into one
Browse files Browse the repository at this point in the history
  • Loading branch information
vyneer committed Feb 20, 2024
1 parent 814566f commit 80bf3a2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
18 changes: 9 additions & 9 deletions assets/chat/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1717,18 +1717,18 @@ hr {
.pref-autocompletehelper #chat-auto-complete.active {
display: block;
}
.pref-disableemoteanimations .emote {
&,
&:hover,
&:before,
&:after {
.pref-disableanimations {
.emote,
.emote:hover,
.emote::before,
.emote::after {
animation: none !important;
}
}

.pref-disableflairanimations a.user,
.pref-disableflairanimations span.user {
animation: none !important;
a.user,
span.user {
animation: none !important;
}
}

/* OverlayScrollbars theme */
Expand Down
3 changes: 1 addition & 2 deletions assets/chat/js/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ const settingsdefault = new Map(
hidensfl: false,
fontscale: 'auto',
censorbadwords: false,
disableemoteanimations: false,
disableflairanimations: false,
disableanimations: false,
}),
);

Expand Down
12 changes: 3 additions & 9 deletions assets/views/embed.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,9 @@ <h4>Messages</h4>
</select>
</div>
<div class="form-group checkbox">
<label title="Disable non-GIF emote animations">
<input name="disableemoteanimations" type="checkbox" /> Disable
non-GIF emote animations
</label>
</div>
<div class="form-group checkbox">
<label title="Disable non-GIF flair animations">
<input name="disableflairanimations" type="checkbox" /> Disable
non-GIF flair animations
<label title="Disable animations when possible">
<input name="disableanimations" type="checkbox" /> Disable
animations when possible
</label>
</div>

Expand Down

0 comments on commit 80bf3a2

Please sign in to comment.