mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Add comment
This commit is contained in:
@@ -43,6 +43,7 @@ class MessageHandler {
|
|||||||
|
|
||||||
let allowPopup = (window === window.top);
|
let allowPopup = (window === window.top);
|
||||||
|
|
||||||
|
// To prevent clickjacking
|
||||||
window.onmessage = async e => {
|
window.onmessage = async e => {
|
||||||
if (e.source !== window.parent) return
|
if (e.source !== window.parent) return
|
||||||
if (e.origin.endsWith('.youtube.com')) return allowPopup = true;
|
if (e.origin.endsWith('.youtube.com')) return allowPopup = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user