mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 06:46:04 +02:00
Fix custom CSS
This commit is contained in:
@@ -162,7 +162,9 @@ async function refreshCustomCss() {
|
|||||||
$appCustomStyle.setAttribute('id', 'app-custom-style');
|
$appCustomStyle.setAttribute('id', 'app-custom-style');
|
||||||
$appCustomStyle.rel = 'stylesheet';
|
$appCustomStyle.rel = 'stylesheet';
|
||||||
$appCustomStyle.type = 'text/css';
|
$appCustomStyle.type = 'text/css';
|
||||||
$appCustomStyle.textContent = customCss;
|
$appCustomStyle.href = URL.createObjectURL(
|
||||||
|
new Blob([customCss], { type: 'text/css' })
|
||||||
|
);
|
||||||
head.appendChild($appCustomStyle);
|
head.appendChild($appCustomStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -189,6 +189,10 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
|||||||
}
|
}
|
||||||
} else if (e.altKey && e.key === 'R') {
|
} else if (e.altKey && e.key === 'R') {
|
||||||
refreshCustomCss();
|
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'))) {
|
if (document.contains(document.getElementById('app-emoji-font'))) {
|
||||||
document.getElementById('app-emoji-font').remove();
|
document.getElementById('app-emoji-font').remove();
|
||||||
}
|
}
|
||||||
if (gameStore.isRunningUnderWine) {
|
if (state.isRunningUnderWine) {
|
||||||
const $appEmojiFont = document.createElement('link');
|
const $appEmojiFont = document.createElement('link');
|
||||||
$appEmojiFont.setAttribute('id', 'app-emoji-font');
|
$appEmojiFont.setAttribute('id', 'app-emoji-font');
|
||||||
$appEmojiFont.rel = 'stylesheet';
|
$appEmojiFont.rel = 'stylesheet';
|
||||||
|
|||||||
Reference in New Issue
Block a user