show userstyles status on the bottom of the page

This commit is contained in:
Malte Jürgens
2023-02-17 16:20:29 +01:00
parent 63180f5d53
commit 3119e1df19
10 changed files with 134 additions and 68 deletions

View File

@@ -159,6 +159,7 @@ function main() {
function updateUserstyles() {
userscript.log("Loading userstyles...");
userscript.loadingMessage = "Loading userstyles...";
let stylesheet = document.getElementById("discordScreenaudioUserstyles");
if (!stylesheet) {
stylesheet = document.createElement("style");
@@ -168,6 +169,7 @@ function main() {
}
stylesheet.innerText = userscript.userstyles;
userscript.log("Finished loading userstyles");
userscript.loadingMessage = "";
}
userscript.userstylesChanged.connect(updateUserstyles);