| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 | 198 |
| 199 FilterNotifier.on("subscription.added", onFilterChange); | 199 FilterNotifier.on("subscription.added", onFilterChange); |
| 200 FilterNotifier.on("subscription.removed", onFilterChange); | 200 FilterNotifier.on("subscription.removed", onFilterChange); |
| 201 FilterNotifier.on("subscription.updated", onFilterChange); | 201 FilterNotifier.on("subscription.updated", onFilterChange); |
| 202 FilterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true)); | 202 FilterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true)); |
| 203 FilterNotifier.on("filter.added", onFilterChange); | 203 FilterNotifier.on("filter.added", onFilterChange); |
| 204 FilterNotifier.on("filter.removed", onFilterChange); | 204 FilterNotifier.on("filter.removed", onFilterChange); |
| 205 FilterNotifier.on("filter.disabled", arg => onFilterChange(arg, true)); | 205 FilterNotifier.on("filter.disabled", arg => onFilterChange(arg, true)); |
| 206 FilterNotifier.on("load", onFilterChange); | 206 FilterNotifier.on("load", onFilterChange); |
| 207 | 207 |
| 208 port.on("request.blockedByWrapper", (msg, sender) => | 208 port.on("request.blockedByWrapper", (msg, sender) => |
|
Sebastian Noack
2018/03/13 17:43:01
You might want to rename this message to "request.
Manish Jethani
2018/03/13 18:05:11
Done.
| |
| 209 { | 209 { |
| 210 // Chrome 58 onwards directly supports WebSocket blocking, so we can ignore | |
| 211 // messages from the wrapper here (see https://crbug.com/129353). Hopefully | |
| 212 // WebRTC will be supported soon too (see https://crbug.com/707683). | |
| 213 // Edge supports neither webRequest.ResourceType nor WebSocket blocking yet: | |
| 214 // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/102973 76/ | |
| 215 if (browser.webRequest.ResourceType && | |
| 216 (msg.requestType.toUpperCase() in browser.webRequest.ResourceType)) | |
| 217 { | |
| 218 return false; | |
| 219 } | |
| 220 | |
| 221 return ext.webRequest.onBeforeRequest._dispatch( | 210 return ext.webRequest.onBeforeRequest._dispatch( |
| 222 new URL(msg.url), | 211 new URL(msg.url), |
| 223 msg.requestType, | 212 msg.requestType, |
|
Sebastian Noack
2018/03/13 17:43:01
This can be hard-coded to "webrtc" now.
Manish Jethani
2018/03/13 18:05:11
Done.
| |
| 224 sender.page, | 213 sender.page, |
| 225 sender.frame | 214 sender.frame |
| 226 ).includes(false); | 215 ).includes(false); |
| 227 }); | 216 }); |
|
Sebastian Noack
2018/03/13 17:43:01
Please also remove the hard-coded "WEBSOCKET" valu
Manish Jethani
2018/03/13 18:05:11
Done.
| |
| OLD | NEW |