Fix custom CSS

This commit is contained in:
Natsumi
2025-07-19 16:31:12 +12:00
parent d26a05b02b
commit eaeadb9cc3
2 changed files with 8 additions and 2 deletions

View File

@@ -162,7 +162,9 @@ async function refreshCustomCss() {
$appCustomStyle.setAttribute('id', 'app-custom-style');
$appCustomStyle.rel = 'stylesheet';
$appCustomStyle.type = 'text/css';
$appCustomStyle.textContent = customCss;
$appCustomStyle.href = URL.createObjectURL(
new Blob([customCss], { type: 'text/css' })
);
head.appendChild($appCustomStyle);
}
}

View File

@@ -189,6 +189,10 @@ export const useVrcxStore = defineStore('Vrcx', () => {
}
} else if (e.altKey && e.key === 'R') {
refreshCustomCss();
$app.$message({
message: 'Custom CSS refreshed',
type: 'success'
});
}
});
@@ -203,7 +207,7 @@ export const useVrcxStore = defineStore('Vrcx', () => {
if (document.contains(document.getElementById('app-emoji-font'))) {
document.getElementById('app-emoji-font').remove();
}
if (gameStore.isRunningUnderWine) {
if (state.isRunningUnderWine) {
const $appEmojiFont = document.createElement('link');
$appEmojiFont.setAttribute('id', 'app-emoji-font');
$appEmojiFont.rel = 'stylesheet';