Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 typeNode.setAttribute("value", Policy.typeDescr[type].toLowerCase().replace( /\_/g, "-")); | 155 typeNode.setAttribute("value", Policy.typeDescr[type].toLowerCase().replace( /\_/g, "-")); |
156 typeNode.setAttribute("label", Policy.localizedDescr[type].toLowerCase()); | 156 typeNode.setAttribute("label", Policy.localizedDescr[type].toLowerCase()); |
157 | 157 |
158 let typeMask = RegExpFilter.typeMap[Policy.typeDescr[type]]; | 158 let typeMask = RegExpFilter.typeMap[Policy.typeDescr[type]]; |
159 typeNode._defaultType = (typeMask & defaultTypes) != 0; | 159 typeNode._defaultType = (typeMask & defaultTypes) != 0; |
160 if ((isDefaultType && typeNode._defaultType) || (!isDefaultType && item.type == type)) | 160 if ((isDefaultType && typeNode._defaultType) || (!isDefaultType && item.type == type)) |
161 typeNode.setAttribute("checked", "true"); | 161 typeNode.setAttribute("checked", "true"); |
162 | 162 |
163 if (item.type == type) | 163 if (item.type == type) |
164 typeNode.setAttribute("disabled", "true"); | 164 typeNode.setAttribute("disabled", "true"); |
165 typeNode.addEventListener("command", () => checkboxUpdated(this), false); | 165 typeNode.addEventListener("command", () => checkboxUpdated(typeNode), false) ; |
tschuster
2015/04/13 10:12:04
I think |this| here would be wrong. It's probably
Sebastian Noack
2015/04/13 10:22:04
Well spotted.
| |
166 typeGroup.appendChild(typeNode); | 166 typeGroup.appendChild(typeNode); |
167 } | 167 } |
168 | 168 |
169 let collapseDefault = E("collapseDefault"); | 169 let collapseDefault = E("collapseDefault"); |
170 collapseDefault.label = collapseDefault.getAttribute(Prefs.fastcollapse ? "lab el_no" : "label_yes"); | 170 collapseDefault.label = collapseDefault.getAttribute(Prefs.fastcollapse ? "lab el_no" : "label_yes"); |
171 E("collapse").value = ""; | 171 E("collapse").value = ""; |
172 E("collapse").setAttribute("label", collapseDefault.label); | 172 E("collapse").setAttribute("label", collapseDefault.label); |
173 | 173 |
174 let warning = E("disabledWarning"); | 174 let warning = E("disabledWarning"); |
175 generateLinkText(warning); | 175 generateLinkText(warning); |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
403 * Selects or unselects all type checkboxes except those | 403 * Selects or unselects all type checkboxes except those |
404 * that are disabled. | 404 * that are disabled. |
405 */ | 405 */ |
406 function selectAllTypes(/**Boolean*/ select) | 406 function selectAllTypes(/**Boolean*/ select) |
407 { | 407 { |
408 for (let typeNode = E("typeGroup").firstChild; typeNode; typeNode = typeNode.n extSibling) | 408 for (let typeNode = E("typeGroup").firstChild; typeNode; typeNode = typeNode.n extSibling) |
409 if (typeNode.getAttribute("disabled") != "true") | 409 if (typeNode.getAttribute("disabled") != "true") |
410 typeNode.checked = select; | 410 typeNode.checked = select; |
411 updateFilter(); | 411 updateFilter(); |
412 } | 412 } |
LEFT | RIGHT |