| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 shouldAllow: function({contentType, location, frames, isPrivate}) | 109 shouldAllow: function({contentType, location, frames, isPrivate}) |
| 110 { | 110 { |
| 111 let hits = []; | 111 let hits = []; |
| 112 | 112 |
| 113 function addHit(frameIndex, contentType, docDomain, thirdParty, location, fi
lter) | 113 function addHit(frameIndex, contentType, docDomain, thirdParty, location, fi
lter) |
| 114 { | 114 { |
| 115 if (filter && !isPrivate) | 115 if (filter && !isPrivate) |
| 116 FilterStorage.increaseHitCount(filter); | 116 FilterStorage.increaseHitCount(filter); |
| 117 hits.push({ | 117 hits.push({ |
| 118 frameIndex, contentType, docDomain, thirdParty, location, | 118 frameIndex, contentType, docDomain, thirdParty, location, |
| 119 filter: filter ? filter.text : null | 119 filter: filter ? filter.text : null, |
| 120 filterType: filter ? filter.type : null |
| 120 }); | 121 }); |
| 121 } | 122 } |
| 122 | 123 |
| 123 function response(allow, collapse) | 124 function response(allow, collapse) |
| 124 { | 125 { |
| 125 return {allow, collapse, hits}; | 126 return {allow, collapse, hits}; |
| 126 } | 127 } |
| 127 | 128 |
| 128 // Ignore whitelisted schemes | 129 // Ignore whitelisted schemes |
| 129 if (!this.isBlockableScheme(location)) | 130 if (!this.isBlockableScheme(location)) |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 if (!wnd || wnd.closed) | 404 if (!wnd || wnd.closed) |
| 404 return; | 405 return; |
| 405 | 406 |
| 406 if (entry.type == "OBJECT") | 407 if (entry.type == "OBJECT") |
| 407 { | 408 { |
| 408 node.removeEventListener("mouseover", objectMouseEventHander, true); | 409 node.removeEventListener("mouseover", objectMouseEventHander, true); |
| 409 node.removeEventListener("mouseout", objectMouseEventHander, true); | 410 node.removeEventListener("mouseout", objectMouseEventHander, true); |
| 410 } | 411 } |
| 411 Policy.processNode(wnd, node, entry.type, entry.location, true); | 412 Policy.processNode(wnd, node, entry.type, entry.location, true); |
| 412 } | 413 } |
| OLD | NEW |