MCPcopy
hub / github.com/GooseMod/OpenAsar / getVar

Function getVar

src/mainWindow.js:11–11  ·  view source on GitHub ↗
(name, el = document.body)

Source from the content-addressed store, hash-verified

9let lastBgPrimary = '';
10const themesync = async () => {
11 const getVar = (name, el = document.body) => el && (getComputedStyle(el).getPropertyValue(name) || getVar(name, el.parentElement))?.trim();
12
13 const bgPrimary = getVar('--background-primary');
14 if (!bgPrimary || bgPrimary === '#36393f' || bgPrimary === '#fff' || bgPrimary === lastBgPrimary) return; // Default primary bg or same as last

Callers 1

themesyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected