Index: lib/requestBlocker.js |
diff --git a/lib/requestBlocker.js b/lib/requestBlocker.js |
index bb7e482e108dfb6d82778364b349a752a8cd4f99..2a3ad9dce95dcb6142254c546ff9900478e29b23 100644 |
--- a/lib/requestBlocker.js |
+++ b/lib/requestBlocker.js |
@@ -79,16 +79,25 @@ ext.webRequest.onBeforeRequest.addListener((url, type, page, frame) => |
port.on("filters.collapse", (message, sender) => |
{ |
- if (checkWhitelisted(sender.page, sender.frame)) |
+ var sender_frame = sender.frame; |
+ if (message.dynamicFrameURL) |
+ { |
+ sender_frame = { |
+ url: new URL(message.dynamicFrameURL, message.baseURL), |
+ parent: sender.frame |
+ }; |
+ } |
+ |
+ if (checkWhitelisted(sender.page, sender_frame)) |
return false; |
let typeMask = RegExpFilter.typeMap[message.mediatype]; |
- let documentHost = extractHostFromFrame(sender.frame); |
- let sitekey = getKey(sender.page, sender.frame); |
+ let documentHost = extractHostFromFrame(sender_frame); |
+ let sitekey = getKey(sender.page, sender_frame); |
let blocked = false; |
let specificOnly = checkWhitelisted( |
- sender.page, sender.frame, |
+ sender.page, sender_frame, |
RegExpFilter.typeMap.GENERICBLOCK |
); |