From eaeadb9cc32d98a75168c881443214f55790755b Mon Sep 17 00:00:00 2001 From: Natsumi Date: Sat, 19 Jul 2025 16:31:12 +1200 Subject: [PATCH] Fix custom CSS --- src/shared/utils/base/ui.js | 4 +++- src/stores/vrcx.js | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/shared/utils/base/ui.js b/src/shared/utils/base/ui.js index 4949620a..4b39a753 100644 --- a/src/shared/utils/base/ui.js +++ b/src/shared/utils/base/ui.js @@ -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); } } diff --git a/src/stores/vrcx.js b/src/stores/vrcx.js index cc664b9c..59b8e528 100644 --- a/src/stores/vrcx.js +++ b/src/stores/vrcx.js @@ -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';