diff options
-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 {" |