From dd2465580790ebdb0ff985be3a502d28b21edbe0 Mon Sep 17 00:00:00 2001 From: redbirdly <155550833+redbirdly@users.noreply.github.com> Date: Sun, 18 May 2025 22:01:33 +0900 Subject: [PATCH] Add files via upload --- mods/oxide.theme.js | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 mods/oxide.theme.js diff --git a/mods/oxide.theme.js b/mods/oxide.theme.js new file mode 100644 index 00000000..80acf01e --- /dev/null +++ b/mods/oxide.theme.js @@ -0,0 +1,43 @@ +// 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';}); + +});