| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 else if (filter instanceof ElemHideBase) | 102 else if (filter instanceof ElemHideBase) |
| 103 { | 103 { |
| 104 if (filter instanceof ElemHideFilter) | 104 if (filter instanceof ElemHideFilter) |
| 105 result.push("type=elemhide"); | 105 result.push("type=elemhide"); |
| 106 else if (filter instanceof ElemHideException) | 106 else if (filter instanceof ElemHideException) |
| 107 result.push("type=elemhideexception"); | 107 result.push("type=elemhideexception"); |
| 108 else if (filter instanceof ElemHideEmulationFilter) | 108 else if (filter instanceof ElemHideEmulationFilter) |
| 109 result.push("type=elemhideemulation"); | 109 result.push("type=elemhideemulation"); |
| 110 | 110 |
| 111 result.push("selectorDomains=" + (filter.selectorDomains || "")); | 111 result.push("selectorDomains=" + |
| 112 [...filter.domains || []] |
| 113 .filter(([domain, isIncluded]) => isIncluded) |
| 114 .map(([domain]) => domain.toLowerCase())); |
| 112 result.push("selector=" + filter.selector); | 115 result.push("selector=" + filter.selector); |
| 113 } | 116 } |
| 114 } | 117 } |
| 115 return result; | 118 return result; |
| 116 } | 119 } |
| 117 | 120 |
| 118 function addDefaults(expected) | 121 function addDefaults(expected) |
| 119 { | 122 { |
| 120 let type = null; | 123 let type = null; |
| 121 let hasProperty = {}; | 124 let hasProperty = {}; |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 filterRelative.rewriteUrl("http://content.server/file/foo.txt?bar"), | 541 filterRelative.rewriteUrl("http://content.server/file/foo.txt?bar"), |
| 539 "http://content.server/file/foo.txt/disable" | 542 "http://content.server/file/foo.txt/disable" |
| 540 ); | 543 ); |
| 541 test.equal( | 544 test.equal( |
| 542 filterRelative.rewriteUrl("http://example.com/file/foo.txt?bar"), | 545 filterRelative.rewriteUrl("http://example.com/file/foo.txt?bar"), |
| 543 "http://example.com/file/foo.txt/disable" | 546 "http://example.com/file/foo.txt/disable" |
| 544 ); | 547 ); |
| 545 | 548 |
| 546 test.done(); | 549 test.done(); |
| 547 }; | 550 }; |
| OLD | NEW |