Sv443 1 年之前
父節點
當前提交
2c2a765891
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);
 }