| 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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 filterType: filter ? filter.type : null | 132 filterType: filter ? filter.type : null |
| 133 }); | 133 }); |
| 134 } | 134 } |
| 135 | 135 |
| 136 function response(allow, collapse) | 136 function response(allow, collapse) |
| 137 { | 137 { |
| 138 return {allow, collapse, hits}; | 138 return {allow, collapse, hits}; |
| 139 } | 139 } |
| 140 | 140 |
| 141 // Ignore whitelisted schemes | 141 // Ignore whitelisted schemes |
| 142 if (!this.isBlockableScheme(location)) | 142 if (contentType != "POPUP" && !this.isBlockableScheme(location)) |
| 143 return response(true, false); | 143 return response(true, false); |
| 144 | 144 |
| 145 // Interpret unknown types as "other" | 145 // Interpret unknown types as "other" |
| 146 contentType = this.contentTypes.get(contentType) || "OTHER"; | 146 contentType = this.contentTypes.get(contentType) || "OTHER"; |
| 147 | 147 |
| 148 let nogeneric = false; | 148 let nogeneric = false; |
| 149 if (Prefs.enabled) | 149 if (Prefs.enabled) |
| 150 { | 150 { |
| 151 let whitelistHit = | 151 let whitelistHit = |
| 152 this.isFrameWhitelisted(frames, false); | 152 this.isFrameWhitelisted(frames, false); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 { | 405 { |
| 406 // EffectiveTLDService throws on IP addresses, just compare the host name | 406 // EffectiveTLDService throws on IP addresses, just compare the host name |
| 407 let host = ""; | 407 let host = ""; |
| 408 try | 408 try |
| 409 { | 409 { |
| 410 host = uri.host; | 410 host = uri.host; |
| 411 } catch (e) {} | 411 } catch (e) {} |
| 412 return host != docDomain; | 412 return host != docDomain; |
| 413 } | 413 } |
| 414 } | 414 } |
| OLD | NEW |