aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2023-07-18 13:26:41 -0400
committerAjay <[email protected]>2023-07-18 13:26:41 -0400
commit6f8c44b2eb69cbe6938a1ca85f6aa800fdc6ca67 (patch)
treeca0dec74c8d7386808c5824fb46c6eac4b264288
parentbbc5c11667cbde780f08f9647a14a4f34ce1ddfa (diff)
downloadSponsorBlock-6f8c44b2eb69cbe6938a1ca85f6aa800fdc6ca67.tar.gz
SponsorBlock-6f8c44b2eb69cbe6938a1ca85f6aa800fdc6ca67.zip
Fix category colors sometimes not working
-rw-r--r--src/content.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/content.ts b/src/content.ts
index 3a9893b7..28c87aad 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -2489,7 +2489,9 @@ function setCategoryColorCSSVariables() {
if (!styleContainer) {
styleContainer = document.createElement("style");
styleContainer.id = "sbCategoryColorStyle";
- document.head.appendChild(styleContainer)
+
+ const head = (document.head || document.documentElement);
+ head.appendChild(styleContainer)
}
let css = ":root {"