Merge pull request #1113 from redbirdly/main

New custom theme
This commit is contained in:
slweeb 2025-05-18 13:11:49 -04:00 committed by GitHub
commit ad9c6ea537
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 43 additions and 0 deletions

43
mods/oxide.theme.js Normal file
View File

@ -0,0 +1,43 @@
// Oxide.theme.js
runAfterReset(function applyTheme() {
// Only run once
const index = runAfterResetList.findIndex(fn => fn.name === "applyTheme");
if (index !== -1) runAfterResetList.splice(index, 1);
const css = `
:root {
--theme: #66AC92;
--theme-dark: #015C53;
--theme-darker: #015C53;
--theme-darker-opac85: #015C5377;
--theme-darkest: #0B1E1A;
--theme-darkest2: #0B1E1A;
--theme-opac85: #66AC9279;
--theme-opac75: #66AC92BF;
--theme-opac50: #00000080;
--theme-opac25: #66AC9240;
--theme-opac10: #66AC921A;
}
a {
color: var(--theme);
text-decoration: underline;
}
`;
let styleTag = document.getElementById("themeStyle");
if (!styleTag) {
styleTag = document.createElement("style");
styleTag.id = "themeStyle";
document.body.appendChild(styleTag);
}
styleTag.textContent = css;
document
.getElementById('extraInfo')
.querySelectorAll('*')
.forEach(el => {el.style.color = '#66AC92'; el.style.backgrounda = 'none';});
});