injectcss if glide is enabled

This commit is contained in:
thororen1234 2024-12-19 21:16:25 -05:00
parent 70f5dba456
commit 0a0d817d1e

View file

@ -243,11 +243,12 @@ function parseFontContent() {
return fontName;
}
function injectCSS() {
if (Settings.plugins.Glide.enabled) {
const fontName = parseFontContent();
const theCSS = getCSS(fontName);
var elementToRemove = document.getElementById("GlideStyleInjection");
let elementToRemove = document.getElementById("GlideStyleInjection");
if (elementToRemove) {
elementToRemove.remove();
}
@ -256,6 +257,7 @@ function injectCSS() {
styleElement.textContent = theCSS;
document.documentElement.appendChild(styleElement);
}
}
function getCSS(fontName) {
return `