Merge remote-tracking branch 'origin/develop' into akkoma-support-part-2

This commit is contained in:
Henry Jameson 2025-06-28 19:16:48 +03:00
commit 71fdae1d8f
16 changed files with 175 additions and 148 deletions

View file

@ -234,20 +234,14 @@ export const applyConfig = (input) => {
return
}
const head = document.head
const rules = Object
.entries(config)
.filter(([, v]) => v)
.map(([k, v]) => `--${k}: ${v}`).join(';')
document.getElementById('style-config')?.remove()
const styleEl = document.getElementById('theme-holder')
styleEl.id = 'style-config'
head.appendChild(styleEl)
const styleSheet = styleEl.sheet
styleSheet.toString()
styleSheet.insertRule(`:root { ${rules} }`, 'index-max')
// TODO find a way to make this not apply to theme previews