mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 06:33:03 -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;
|
return fontName;
|
||||||
}
|
}
|
||||||
function injectCSS() {
|
function injectCSS() {
|
||||||
|
if (Settings.plugins.Glide.enabled) {
|
||||||
|
|
||||||
const fontName = parseFontContent();
|
const fontName = parseFontContent();
|
||||||
const theCSS = getCSS(fontName);
|
const theCSS = getCSS(fontName);
|
||||||
|
|
||||||
var elementToRemove = document.getElementById("GlideStyleInjection");
|
let elementToRemove = document.getElementById("GlideStyleInjection");
|
||||||
if (elementToRemove) {
|
if (elementToRemove) {
|
||||||
elementToRemove.remove();
|
elementToRemove.remove();
|
||||||
}
|
}
|
||||||
|
@ -255,6 +256,7 @@ function injectCSS() {
|
||||||
styleElement.id = "GlideStyleInjection";
|
styleElement.id = "GlideStyleInjection";
|
||||||
styleElement.textContent = theCSS;
|
styleElement.textContent = theCSS;
|
||||||
document.documentElement.appendChild(styleElement);
|
document.documentElement.appendChild(styleElement);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCSS(fontName) {
|
function getCSS(fontName) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue