Add custom css and rs classes for it

This commit is contained in:
kwaroran
2024-09-09 18:47:30 +09:00
parent 611f3e4b94
commit eb8e1d31c8
10 changed files with 67 additions and 22 deletions

View File

@@ -45,11 +45,29 @@ export const ShowRealmFrameStore = writable('')
export const PlaygroundStore = writable(0)
export const HideIconStore = writable(false)
export const UserIconProtrait = writable(false)
export const CustomCSSStore = writable('')
export const SafeModeStore = writable(false)
let lastGlobalEnabledModules: string[] = []
let lastChatEnabledModules: string[] = []
let moduleHideIcon = false
let characterHideIcon = false
CustomCSSStore.subscribe((css) => {
console.log(css)
const q = document.querySelector('#customcss')
if(q){
q.innerHTML = css
}
else{
const s = document.createElement('style')
s.id = 'customcss'
s.innerHTML = css
document.body.appendChild(s)
}
})
function createSimpleCharacter(char:character|groupChat){
if((!char) || char.type === 'group'){
return null