mirror of
https://github.com/Equicord/Equicord.git
synced 2025-03-14 14:10:26 -04:00
injectcss if glide is enabled
This commit is contained in:
parent
70f5dba456
commit
0a0d817d1e
1 changed files with 12 additions and 10 deletions
|
@ -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 `
|
||||
|
|
Loading…
Add table
Reference in a new issue