OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 else if (!Prefs.enabled && ElemHide.applied) | 241 else if (!Prefs.enabled && ElemHide.applied) |
242 { | 242 { |
243 ElemHide.unapply(); | 243 ElemHide.unapply(); |
244 TimeLine.log("ElemHide.unapply() finished"); | 244 TimeLine.log("ElemHide.unapply() finished"); |
245 } | 245 } |
246 | 246 |
247 TimeLine.leave("ElemHide.apply() done (no file changes)"); | 247 TimeLine.leave("ElemHide.apply() done (no file changes)"); |
248 return; | 248 return; |
249 } | 249 } |
250 | 250 |
251 IO.writeToFile(styleURL.file, false, this._generateCSSContent(), function(e) | 251 IO.writeToFile(styleURL.file, this._generateCSSContent(), function(e) |
252 { | 252 { |
253 TimeLine.enter("ElemHide.apply() write callback"); | 253 TimeLine.enter("ElemHide.apply() write callback"); |
254 this._applying = false; | 254 this._applying = false; |
255 | 255 |
256 if (e && e.result == Cr.NS_ERROR_NOT_AVAILABLE) | 256 if (e && e.result == Cr.NS_ERROR_NOT_AVAILABLE) |
257 IO.removeFile(styleURL.file, function(e2) {}); | 257 IO.removeFile(styleURL.file, function(e2) {}); |
258 else if (e) | 258 else if (e) |
259 Cu.reportError(e); | 259 Cu.reportError(e); |
260 | 260 |
261 if (this._needsApply) | 261 if (this._needsApply) |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 let filter = filterByKey[key]; | 394 let filter = filterByKey[key]; |
395 if (specificOnly && (!filter.domains || filter.domains[""])) | 395 if (specificOnly && (!filter.domains || filter.domains[""])) |
396 continue; | 396 continue; |
397 | 397 |
398 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain)) | 398 if (filter.isActiveOnDomain(domain) && !this.getException(filter, domain)) |
399 result.push(filter.selector); | 399 result.push(filter.selector); |
400 } | 400 } |
401 return result; | 401 return result; |
402 } | 402 } |
403 }; | 403 }; |
OLD | NEW |