Skip to content

Commit

Permalink
DES-199: add an option to disable emote and flair animations (#420)
Browse files Browse the repository at this point in the history
* feat: add an option to disable flair animations

* feat: add an option to disable emote animations

* refactor: merge two animation disabling options into one
  • Loading branch information
vyneer authored Feb 29, 2024
1 parent f6e2c4b commit ce009c1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
13 changes: 13 additions & 0 deletions assets/chat/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1717,6 +1717,19 @@ hr {
.pref-autocompletehelper #chat-auto-complete.active {
display: block;
}
.pref-disableanimations {
.emote,
.emote:hover,
.emote::before,
.emote::after {
animation: none !important;
}

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

/* OverlayScrollbars theme */
.dgg-scroller-theme.os-scrollbar-horizontal {
Expand Down
1 change: 1 addition & 0 deletions assets/chat/js/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ const settingsdefault = new Map(
hidensfl: false,
fontscale: 'auto',
censorbadwords: false,
disableanimations: false,
}),
);

Expand Down
6 changes: 6 additions & 0 deletions assets/views/embed.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ <h4>Messages</h4>
<option value="2">do nothing</option>
</select>
</div>
<div class="form-group checkbox">
<label title="Disable animations when possible">
<input name="disableanimations" type="checkbox" /> Disable
animations when possible
</label>
</div>

<h4>Notifications</h4>
<div class="form-group checkbox">
Expand Down

0 comments on commit ce009c1

Please sign in to comment.