diff options
author | Ajay <[email protected]> | 2023-07-18 13:26:41 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2023-07-18 13:26:41 -0400 |
commit | 6f8c44b2eb69cbe6938a1ca85f6aa800fdc6ca67 (patch) | |
tree | ca0dec74c8d7386808c5824fb46c6eac4b264288 | |
parent | bbc5c11667cbde780f08f9647a14a4f34ce1ddfa (diff) | |
download | SponsorBlock-6f8c44b2eb69cbe6938a1ca85f6aa800fdc6ca67.tar.gz SponsorBlock-6f8c44b2eb69cbe6938a1ca85f6aa800fdc6ca67.zip |
Fix category colors sometimes not working
-rw-r--r-- | src/content.ts | 4 |
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 {" |