Merge pull request #1153 from redbirdly/main

Fix bug in oxide.theme.js that could break other mods
This commit is contained in:
slweeb 2025-06-29 09:41:27 -04:00 committed by GitHub
commit 66b6d74c8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -1,9 +1,10 @@
// Oxide.theme.js
let hasAppliedTheme = false;
runAfterReset(function applyTheme() {
// Only run once
const index = runAfterResetList.findIndex(fn => fn.name === "applyTheme");
if (index !== -1) runAfterResetList.splice(index, 1);
if (hasAppliedTheme) return;
hasAppliedTheme = true;
const css = `
:root {
@ -38,6 +39,8 @@ runAfterReset(function applyTheme() {
document
.getElementById('extraInfo')
.querySelectorAll('*')
.forEach(el => {el.style.color = '#66AC92'; el.style.backgrounda = 'none';});
.forEach(el => {
el.style.color = '#66AC92';
el.style.background = 'none';
});
});