feat: pass vencord variable when compiling

this is another one of those standards-defining things like
`vc-requiredPlugins`, but i do genuinely think passing the client mod
that's in use here will be beneficial in the long run for usercss
authors since they can write one file that works across multiple.
hopefully other mods that implement usercss will adopt this 🤞
This commit is contained in:
Lewis Crichton 2023-12-28 14:05:25 +00:00
parent 2cafedc7e7
commit 1c0dff3666
No known key found for this signature in database

View file

@ -75,7 +75,9 @@ export async function compileUsercss(fileName: string) {
return null;
}
const varsToPass = {};
const varsToPass = {
vencord: "true"
};
for (const [k, v] of Object.entries(vars)) {
varsToPass[k] = Settings.userCssVars[id]?.[k] ?? v.default;