Sv443 1 year ago
parent
commit
4e91061c97
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/utils.ts

+ 1 - 1
src/utils.ts

@@ -122,7 +122,7 @@ export function addGlobalStyle(style: string, ref?: string) {
   const styleElem = document.createElement("style");
   styleElem.id = `betterytm-style-${ref}`;
   styleElem.innerHTML = style;
-  document.querySelector("head")!.appendChild(styleElem);
+  document.head.appendChild(styleElem);
 
   dbg && console.log(`BetterYTM: Inserted global style with ref '${ref}':`, styleElem);
 }