Left: | ||
Right: |
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 disableElement(collapse, type == "whitelist", "value", ""); | 217 disableElement(collapse, type == "whitelist", "value", ""); |
218 if (collapse.value != "") | 218 if (collapse.value != "") |
219 options.push([collapse._lastChange, collapse.value]); | 219 options.push([collapse._lastChange, collapse.value]); |
220 | 220 |
221 let enabledTypes = []; | 221 let enabledTypes = []; |
222 let disabledTypes = []; | 222 let disabledTypes = []; |
223 let forceEnabledTypes = []; | 223 let forceEnabledTypes = []; |
224 for (let typeNode = E("typeGroup").firstChild; typeNode; typeNode = typeNode .nextSibling) | 224 for (let typeNode = E("typeGroup").firstChild; typeNode; typeNode = typeNode .nextSibling) |
225 { | 225 { |
226 let value = typeNode.getAttribute("value"); | 226 let value = typeNode.getAttribute("value"); |
227 if (value == "document") | 227 if (value == "document" || value == "genericblock" || value == "generichid e") |
Thomas Greiner
2016/01/06 15:44:51
What about "elemhide"? Similar to these options "e
Sebastian Noack
2016/01/06 15:49:33
Interestingly, "ELEMHIDE" is skipped above. So no
Thomas Greiner
2016/01/06 16:07:02
I assume that's because the composer only creates
Sebastian Noack
2016/01/06 16:15:10
I wonder whether we should expose generichide and
| |
228 disableElement(typeNode, type != "whitelist", "checked", false); | 228 disableElement(typeNode, type != "whitelist", "checked", false); |
229 | 229 |
230 if (!typeNode._defaultType) | 230 if (!typeNode._defaultType) |
231 { | 231 { |
232 if (typeNode.getAttribute("checked") == "true") | 232 if (typeNode.getAttribute("checked") == "true") |
233 forceEnabledTypes.push([typeNode._lastChange || 0, value]); | 233 forceEnabledTypes.push([typeNode._lastChange || 0, value]); |
234 } | 234 } |
235 else if (typeNode.getAttribute("checked") == "true") | 235 else if (typeNode.getAttribute("checked") == "true") |
236 enabledTypes.push([typeNode._lastChange || 0, value]); | 236 enabledTypes.push([typeNode._lastChange || 0, value]); |
237 else | 237 else |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
393 * Selects or unselects all type checkboxes except those | 393 * Selects or unselects all type checkboxes except those |
394 * that are disabled. | 394 * that are disabled. |
395 */ | 395 */ |
396 function selectAllTypes(/**Boolean*/ select) | 396 function selectAllTypes(/**Boolean*/ select) |
397 { | 397 { |
398 for (let typeNode = E("typeGroup").firstChild; typeNode; typeNode = typeNode.n extSibling) | 398 for (let typeNode = E("typeGroup").firstChild; typeNode; typeNode = typeNode.n extSibling) |
399 if (typeNode.getAttribute("disabled") != "true") | 399 if (typeNode.getAttribute("disabled") != "true") |
400 typeNode.checked = select; | 400 typeNode.checked = select; |
401 updateFilter(); | 401 updateFilter(); |
402 } | 402 } |
OLD | NEW |