Plugin
BetterDiscordAnimations
Adds smooth animations and transitions to Discord's UI for a better user experience.
Installation: Datei herunterladen und in deinen BetterDiscord-Ordner legen —
%appdata%\\BetterDiscord\\plugins
(Windows) bzw. über Discord: Einstellungen → Plugins → Plugin-Ordner öffnen.
BetterDiscordAnimations.plugin.js · 271 Zeilen · 9.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
/*
FILE META START
name: BetterDiscordAnimations.plugin.js
version: 0.0.10
description: Multi-surface admin, cloud, bot host, login, and secure chat server.
lastModified: 2026-05-04T20:22:59.632Z
checksum: 1f9869bff49eecdf4754706ee610de721acc5b0b7c6eb7487d18744049dda987
FILE META END
*/
/**
* @name BetterDiscordAnimations
* @author HeadX
* @authorId 808385710700494919
* @description Adds smooth animations and transitions to Discord's UI for a better user experience.
* @version 1.0.2
* @invite J6wTJJ5fp
* @website https://headcraft.cloud/better-discord
* @source https://headcraft.cloud/better-discord/BetterDiscordAnimations.plugin.js
* @updateUrl https://headcraft.cloud/better-discord/BetterDiscordAnimations.plugin.js
*/
module.exports = class BetterDiscordAnimations {
constructor() {
this.settings = {};
}
start() {
this.loadSettings();
this.addAnimations();
BdApi.showToast("BetterDiscordAnimations loaded! Enjoy smoother UI!", { type: "success" });
}
stop() {
this.removeAnimations();
BdApi.showToast("BetterDiscordAnimations unloaded!", { type: "info" });
}
loadSettings() {
this.settings = BdApi.Data.load(this.getName(), "settings") || {
enableHoverEffects: true,
enableMessageAnimations: true,
enableChannelTransitions: true,
animationSpeed: "normal",
performanceMode: false
};
}
saveSettings() {
BdApi.Data.save(this.getName(), "settings", this.settings);
}
addAnimations() {
if(this.settings.performanceMode) return;
let css = `
/* General smooth transitions */
[class*="container_"],
[class*="content_"],
[class*="wrapper_"] {
transition: background-color 0.2s ease-in-out, opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}
/* Button hover effects */
button:hover {
transform: scale(1.05);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* Channel list animations */
[role="navigation"] [role="treeitem"] {
transition: background-color 0.3s ease, transform 0.2s ease;
}
[role="navigation"] [role="treeitem"]:hover {
background-color: var(--background-modifier-hover);
transform: translateX(4px);
}
/* Message animations */
[role="listitem"] {
animation: fadeInUp 0.5s ease-out;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Avatar animations */
[class*="avatar"] {
transition: transform 0.3s ease;
}
[class*="avatar"]:hover {
transform: rotate(5deg) scale(1.1);
}
/* Sidebar transitions */
[class*="sidebar_"] {
transition: width 0.3s ease;
}
/* Emoji picker animations */
[class*="emojiPicker_"] {
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
transform: translateY(-20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
/* Loading animations */
[class*="spinner"] {
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* Tooltip animations */
[class*="tooltip_"] {
animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Modal animations */
[class*="modal_"] {
animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
from {
transform: scale(0.9) translateY(-20px);
opacity: 0;
}
to {
transform: scale(1) translateY(0);
opacity: 1;
}
}
/* Notification animations */
[class*="notice_"] {
animation: bounceIn 0.5s ease-out;
}
@keyframes bounceIn {
0% { transform: scale(0.3); opacity: 0; }
50% { transform: scale(1.05); }
70% { transform: scale(0.9); }
100% { transform: scale(1); opacity: 1; }
}
`;
// Conditional CSS based on settings
if (!this.settings.enableHoverEffects) {
css = css.replace(/button:hover {[^}]*}/g, '');
css = css.replace(/\[role="navigation"\] \[role="treeitem"\]:hover {[^}]*}/g, '');
css = css.replace(/\[class\*="avatar"\]:hover {[^}]*}/g, '');
}
if (!this.settings.enableMessageAnimations) {
css = css.replace(/\[role="listitem"\] {[^}]*}/g, '');
css = css.replace(/@keyframes fadeInUp {[^}]*}/g, '');
}
if (!this.settings.enableChannelTransitions) {
css = css.replace(/\[role="navigation"\] \[role="treeitem"\] {[^}]*}/g, '');
}
// Adjust animation speed
if (this.settings.animationSpeed === "fast") {
css = css.replace(/0\.2s/g, '0.1s');
css = css.replace(/0\.3s/g, '0.15s');
css = css.replace(/0\.5s/g, '0.25s');
} else if (this.settings.animationSpeed === "slow") {
css = css.replace(/0\.2s/g, '0.4s');
css = css.replace(/0\.3s/g, '0.6s');
css = css.replace(/0\.5s/g, '1s');
}
BdApi.DOM.addStyle(this.getName(), css);
}
removeAnimations() {
BdApi.DOM.removeStyle(this.getName());
}
getSettingsPanel() {
const panel = document.createElement("div");
panel.innerHTML = `
<div style="padding: 16px;">
<h3>Better Discord Animations Settings</h3>
<div style="margin-bottom: 16px;">
<label>
<input type="checkbox" id="enableHoverEffects" ${this.settings.enableHoverEffects ? 'checked' : ''}>
Enable Hover Effects
</label>
</div>
<div style="margin-bottom: 16px;">
<label>
<input type="checkbox" id="enableMessageAnimations" ${this.settings.enableMessageAnimations ? 'checked' : ''}>
Enable Message Animations
</label>
</div>
<div style="margin-bottom: 16px;">
<label>
<input type="checkbox" id="enableChannelTransitions" ${this.settings.enableChannelTransitions ? 'checked' : ''}>
Enable Channel Transitions
</label>
</div>
<div style="margin-bottom: 16px;">
<label>
<input type="checkbox" id="performanceMode" ${this.settings.performanceMode ? 'checked' : ''}>
Performance Mode (Disable all animations)
</label>
</div>
<div style="margin-bottom: 16px;">
<label>Animation Speed:</label>
<select id="animationSpeed">
<option value="slow" ${this.settings.animationSpeed === 'slow' ? 'selected' : ''}>Slow</option>
<option value="normal" ${this.settings.animationSpeed === 'normal' ? 'selected' : ''}>Normal</option>
<option value="fast" ${this.settings.animationSpeed === 'fast' ? 'selected' : ''}>Fast</option>
</select>
</div>
<button id="applySettings" style="padding: 8px 16px; background: #5865f2; color: white; border: none; border-radius: 4px; cursor: pointer;">Apply Settings</button>
</div>
`;
const applySettings = () => {
this.settings.enableHoverEffects = panel.querySelector("#enableHoverEffects").checked;
this.settings.enableMessageAnimations = panel.querySelector("#enableMessageAnimations").checked;
this.settings.enableChannelTransitions = panel.querySelector("#enableChannelTransitions").checked;
this.settings.performanceMode = panel.querySelector("#performanceMode").checked;
this.settings.animationSpeed = panel.querySelector("#animationSpeed").value;
this.saveSettings();
this.removeAnimations();
this.addAnimations();
BdApi.showToast("Settings applied!", { type: "success" });
};
panel.querySelector("#applySettings").addEventListener("click", applySettings);
return panel;
}
getName() {
return "BetterDiscordAnimations";
}
};