diff options
Diffstat (limited to 'src/popup.ts')
-rw-r--r-- | src/popup.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/popup.ts b/src/popup.ts index ddfff407..3584fba5 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -67,9 +67,11 @@ class MessageHandler { // To prevent clickjacking let allowPopup = window === window.top; -window.addEventListener("message", async (e) => { +window.addEventListener("message", async (e): Promise<void> => { if (e.source !== window.parent) return; - if (e.origin.endsWith('.youtube.com')) return allowPopup = true; + if (e.origin.endsWith('.youtube.com')) { + allowPopup = true; + } }); //make this a function to allow this to run on the content page |