aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/popup.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/popup.ts')
-rw-r--r--src/popup.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/popup.ts b/src/popup.ts
index 21267afe..a6157dea 100644
--- a/src/popup.ts
+++ b/src/popup.ts
@@ -72,6 +72,12 @@ window.addEventListener("message", async (e): Promise<void> => {
if (e.source !== window.parent) return;
if (e.origin.endsWith('.youtube.com')) {
allowPopup = true;
+
+ if (e.data && e.data?.type === "style") {
+ const style = document.createElement("style");
+ style.textContent = e.data.css;
+ document.head.appendChild(style);
+ }
}
});