Index: lib/requestBlocker.js |
=================================================================== |
--- a/lib/requestBlocker.js |
+++ b/lib/requestBlocker.js |
@@ -147,17 +147,20 @@ |
FilterNotifier.on("subscription.removed", onFilterChange); |
FilterNotifier.on("subscription.updated", onFilterChange); |
FilterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true)); |
FilterNotifier.on("filter.added", onFilterChange); |
FilterNotifier.on("filter.removed", onFilterChange); |
FilterNotifier.on("filter.disabled", arg => onFilterChange(arg, true)); |
FilterNotifier.on("load", onFilterChange); |
-port.on("request.websocket", (msg, sender) => |
+if ("WEBSOCKET" in chrome.webRequest.ResourceType) |
Sebastian Noack
2017/03/27 12:13:36
It seems this check should follow the same logic a
Jon Sonesen
2017/03/27 12:35:23
Yeah, I see that was an oversight. For some reason
|
{ |
- return ext.webRequest.onBeforeRequest._dispatch( |
- new URL(msg.url), |
- "WEBSOCKET", |
- sender.page, |
- sender.frame |
- ).indexOf(false) != -1; |
-}); |
+ port.on("request.websocket", (msg, sender) => |
+ { |
+ return ext.webRequest.onBeforeRequest._dispatch( |
+ new URL(msg.url), |
+ "WEBSOCKET", |
+ sender.page, |
+ sender.frame |
+ ).indexOf(false) != -1; |
+ }); |
+} |