mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 21:17:20 +03:00
add noFallThrough, inplicitReturn, update packages
This commit is contained in:
@@ -67,9 +67,13 @@ 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;
|
||||
return
|
||||
}
|
||||
else return;
|
||||
});
|
||||
|
||||
//make this a function to allow this to run on the content page
|
||||
|
||||
Reference in New Issue
Block a user