| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 RegExpFilter.typeMap[message.requestType], message.docDomain, | 218 RegExpFilter.typeMap[message.requestType], message.docDomain, |
| 219 message.thirdParty); | 219 message.thirdParty); |
| 220 callback(filter instanceof BlockingFilter); | 220 callback(filter instanceof BlockingFilter); |
| 221 break; | 221 break; |
| 222 case "filters.get": | 222 case "filters.get": |
| 223 if (message.what == "cssproperties") | 223 if (message.what == "cssproperties") |
| 224 { | 224 { |
| 225 var filters = []; | 225 var filters = []; |
| 226 var checkWhitelisted = require("whitelisting").checkWhitelisted; | 226 var checkWhitelisted = require("whitelisting").checkWhitelisted; |
| 227 | 227 |
| 228 if (!checkWhitelisted(sender.page, sender.frame, | 228 if (Prefs.enabled && !checkWhitelisted(sender.page, sender.frame, |
| 229 RegExpFilter.typeMap.DOCUMENT | | 229 RegExpFilter.typeMap.DOCUMENT | |
| 230 RegExpFilter.typeMap.ELEMHIDE)) | 230 RegExpFilter.typeMap.ELEMHIDE)) |
| 231 { | 231 { |
| 232 filters = CSSRules.getRulesForDomain(sender.frame.url.hostname); | 232 filters = CSSRules.getRulesForDomain(sender.frame.url.hostname); |
| 233 filters = filters.map(function(filter) | 233 filters = filters.map(function(filter) |
| 234 { | 234 { |
| 235 return { | 235 return { |
| 236 prefix: filter.selectorPrefix, | 236 prefix: filter.selectorPrefix, |
| 237 suffix: filter.selectorSuffix, | 237 suffix: filter.selectorSuffix, |
| 238 regexp: filter.regexpString, | 238 regexp: filter.regexpString, |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 for (var i = 0; i < subscriptions.length; i++) | 403 for (var i = 0; i < subscriptions.length; i++) |
| 404 { | 404 { |
| 405 var subscription = subscriptions[i]; | 405 var subscription = subscriptions[i]; |
| 406 if (subscription instanceof DownloadableSubscription) | 406 if (subscription instanceof DownloadableSubscription) |
| 407 Synchronizer.execute(subscription, true); | 407 Synchronizer.execute(subscription, true); |
| 408 } | 408 } |
| 409 break; | 409 break; |
| 410 } | 410 } |
| 411 }); | 411 }); |
| 412 })(this); | 412 })(this); |
| OLD | NEW |