[ThemeSync] Don't use theme-dark, just body
This commit is contained in:
parent
e7e27f09eb
commit
4e4ab5cd47
2 changed files with 1 additions and 3 deletions
|
@ -4,7 +4,7 @@ const update = async () => {
|
||||||
|
|
||||||
let cached = await DiscordNative.userDataCache.getCached() || {};
|
let cached = await DiscordNative.userDataCache.getCached() || {};
|
||||||
|
|
||||||
const value = `.theme-dark { ${vars.reduce((acc, x) => acc += `${x}: ${getVar(x)}; `, '')} }`;
|
const value = `body { ${vars.reduce((acc, x) => acc += `${x}: ${getVar(x)}; `, '')} }`;
|
||||||
const pastValue = cached['openasarSplashCSS'];
|
const pastValue = cached['openasarSplashCSS'];
|
||||||
cached['openasarSplashCSS'] = value;
|
cached['openasarSplashCSS'] = value;
|
||||||
|
|
||||||
|
|
|
@ -132,8 +132,6 @@
|
||||||
document.querySelector('#debug').textContent = DiscordSplash.getDebugInfo();
|
document.querySelector('#debug').textContent = DiscordSplash.getDebugInfo();
|
||||||
|
|
||||||
DiscordSplash.getCSS((css) => {
|
DiscordSplash.getCSS((css) => {
|
||||||
document.body.classList.add('theme-dark'); // Theme compat
|
|
||||||
|
|
||||||
const cssInject = document.createElement('style');
|
const cssInject = document.createElement('style');
|
||||||
cssInject.appendChild(document.createTextNode(css));
|
cssInject.appendChild(document.createTextNode(css));
|
||||||
document.body.appendChild(cssInject);
|
document.body.appendChild(cssInject);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue