Plugin
GalaxyBackground
Fügt ein atemberaubendes animiertes Sonnensystem mit Nebel-Effekten als Hintergrund hinzu. Optimiert für beste Performance und Plugin-Kompatibilität.
Installation: Datei herunterladen und in deinen BetterDiscord-Ordner legen —
%appdata%\\BetterDiscord\\plugins
(Windows) bzw. über Discord: Einstellungen → Plugins → Plugin-Ordner öffnen.
galaxyplugin.plugin.js · 211 Zeilen · 10.1 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
/*
FILE META START
name: galaxyplugin.plugin.js
version: 0.0.10
description: Multi-surface admin, cloud, bot host, login, and secure chat server.
lastModified: 2026-05-04T20:22:59.670Z
checksum: c80d3a158d9f53aede5699639fee2e3117438527c51d6850ddce25b6d35667ea
FILE META END
*/
/**
* @name GalaxyBackground
* @author HeadX
* @authorId 808385710700494919
* @description Fügt ein atemberaubendes animiertes Sonnensystem mit Nebel-Effekten als Hintergrund hinzu. Optimiert für beste Performance und Plugin-Kompatibilität.
* @version 2.3.1
* @invite J6wTJJ5fp
* @website https://headcraft.cloud/better-discord
* @source https://headcraft.cloud/better-discord/GalaxyBackground.plugin.js
* @updateUrl https://headcraft.cloud/better-discord/GalaxyBackground.plugin.js
*/
const { Data, DOM, UI } = BdApi;
module.exports = class GalaxyBackground {
constructor() {
this.name = "GalaxyBackground";
this.defaultConfig = {
enableStars: true,
enableNebula: true,
glassOpacity: 0.85,
glassTint: "#0d1117",
accentColor: "#5865f2",
performanceMode: false
};
this.config = { ...this.defaultConfig };
}
loadSettings() {
const saved = Data.load(this.name, "config");
this.config = saved ? { ...this.defaultConfig, ...saved } : { ...this.defaultConfig };
}
saveSettings() {
Data.save(this.name, "config", this.config);
}
start() {
this.loadSettings();
this.applyBackground();
this._autoUpdate();
BdApi.showToast("GalaxyBackground aktiviert!", { type: "success" });
}
applyBackground() {
const css = `
/* Galaxy Background CSS */
body.galaxy-active {
background: radial-gradient(ellipse at 20% 80%, rgba(88, 101, 242, 0.15) 0%, transparent 50%),
radial-gradient(ellipse at 80% 20%, rgba(114, 137, 218, 0.1) 0%, transparent 50%),
radial-gradient(ellipse at center, #0a0a1a 0%, #050510 100%) !important;
}
body.galaxy-active #app-mount {
background: transparent !important;
}
/* Glass Effect für Sidebars */
body.galaxy-active [class*="sidebar"],
body.galaxy-active [class*="panels"],
body.galaxy-active [class*="container"][class*="chat"] {
background: rgba(13, 17, 23, ${this.config.glassOpacity}) !important;
backdrop-filter: blur(10px) !important;
}
/* Stars Animation */
${this.config.enableStars && !this.config.performanceMode ? `
body.galaxy-active::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: -1;
background-image:
radial-gradient(2px 2px at 20px 30px, white, transparent),
radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
radial-gradient(1px 1px at 90px 40px, white, transparent),
radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
radial-gradient(1px 1px at 230px 80px, white, transparent),
radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent),
radial-gradient(1px 1px at 400px 60px, white, transparent),
radial-gradient(2px 2px at 500px 200px, rgba(255,255,255,0.8), transparent);
background-repeat: repeat;
background-size: 550px 300px;
animation: twinkle 8s ease-in-out infinite;
}
@keyframes twinkle {
0%, 100% { opacity: 0.7; }
50% { opacity: 1; }
}
` : ''}
/* Nebula Effect */
${this.config.enableNebula && !this.config.performanceMode ? `
body.galaxy-active::after {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: -2;
background:
radial-gradient(ellipse at 30% 20%, rgba(88, 101, 242, 0.1) 0%, transparent 40%),
radial-gradient(ellipse at 70% 80%, rgba(114, 137, 218, 0.08) 0%, transparent 40%);
animation: nebulaMove 20s ease-in-out infinite;
}
@keyframes nebulaMove {
0%, 100% { transform: translateX(0) translateY(0); }
25% { transform: translateX(10px) translateY(-10px); }
50% { transform: translateX(-5px) translateY(5px); }
75% { transform: translateX(-10px) translateY(-5px); }
}
` : ''}
`;
DOM.addStyle(this.name, css);
document.body.classList.add("galaxy-active");
}
stop() {
DOM.removeStyle(this.name);
document.body.classList.remove("galaxy-active");
BdApi.showToast("GalaxyBackground deaktiviert!", { type: "info" });
}
// ===== HeadX Auto-Update System =====
async _autoUpdate() {
const pluginName = this.name || this.meta?.name || "GalaxyBackground";
const currentVersion = this.version || this.meta?.version || "0.0.0";
const updateUrl = this.updateUrl || this.meta?.updateUrl || `https://headcraft.cloud/better-discord/${pluginName}.plugin.js`;
try {
const fs = require("fs"), path = require("path");
let res; try { res = await fetch(updateUrl); } catch(e) {}
if (!res?.ok) { try { res = await BdApi.Net.fetch(updateUrl); } catch(e) {} }
if (!res?.ok) return;
const remoteCode = await res.text();
const remoteVersion = remoteCode.match(/@version\s+([^\n\r]+)/)?.[1]?.trim();
if (!remoteVersion) return;
const compare = (a, b) => { const pa = a.split('.').map(Number), pb = b.split('.').map(Number); for (let i = 0; i < Math.max(pa.length, pb.length); i++) { if ((pa[i]||0) > (pb[i]||0)) return 1; if ((pa[i]||0) < (pb[i]||0)) return -1; } return 0; };
if (compare(remoteVersion, currentVersion) <= 0) return;
console.log(`[${pluginName}] Update verfügbar: ${currentVersion} → ${remoteVersion}`);
const pluginsFolder = BdApi.Plugins.folder;
const allFiles = fs.readdirSync(pluginsFolder);
const pluginFile = allFiles.find(f => f.endsWith('.plugin.js') && fs.readFileSync(path.join(pluginsFolder, f), 'utf8').match(new RegExp(`@name\\s+${pluginName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\s`))) || `${pluginName}.plugin.js`;
const filePath = path.join(pluginsFolder, pluginFile);
if (typeof BdApi.UI?.showNotification === 'function') {
BdApi.UI.showNotification({ title: `${pluginName} Update`, content: `Version ${remoteVersion} ist verfügbar! (Aktuell: ${currentVersion})`, actions: [{ label: "Jetzt updaten", onClick: () => { fs.writeFileSync(filePath, remoteCode, 'utf8'); BdApi.showToast(`${pluginName} auf v${remoteVersion} aktualisiert!`, { type: "success" }); } }] });
} else { BdApi.showToast(`${pluginName}: Update v${remoteVersion} verfügbar!`, { type: "warning" }); }
} catch (err) { console.error(`[${pluginName}] Auto-Update Fehler:`, err); }
}
// ===== Ende HeadX Auto-Update System =====
getSettingsPanel() {
const panel = document.createElement("div");
panel.style.padding = "16px";
panel.style.color = "var(--text-normal)";
panel.innerHTML = `
<h3 style="margin-bottom: 16px;">🌌 Galaxy Background Einstellungen</h3>
<div style="margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center;">
<span>Sterne anzeigen</span>
<input type="checkbox" id="enableStars" ${this.config.enableStars ? 'checked' : ''}>
</div>
<div style="margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center;">
<span>Nebel-Effekt</span>
<input type="checkbox" id="enableNebula" ${this.config.enableNebula ? 'checked' : ''}>
</div>
<div style="margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center;">
<span>Performance-Modus (keine Animationen)</span>
<input type="checkbox" id="performanceMode" ${this.config.performanceMode ? 'checked' : ''}>
</div>
<div style="margin-bottom: 12px;">
<span>Glass-Transparenz: ${Math.round(this.config.glassOpacity * 100)}%</span>
<input type="range" id="glassOpacity" min="0.5" max="1" step="0.05" value="${this.config.glassOpacity}" style="width: 100%;">
</div>
<button id="applySettings" style="padding: 8px 16px; background: var(--brand-experiment); color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 10px;">Anwenden</button>
`;
panel.querySelector("#applySettings").onclick = () => {
this.config.enableStars = panel.querySelector("#enableStars").checked;
this.config.enableNebula = panel.querySelector("#enableNebula").checked;
this.config.performanceMode = panel.querySelector("#performanceMode").checked;
this.config.glassOpacity = parseFloat(panel.querySelector("#glassOpacity").value);
this.saveSettings();
DOM.removeStyle(this.name);
this.applyBackground();
BdApi.showToast("Einstellungen angewendet!", { type: "success" });
};
return panel;
}
};