Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/ui/composer.js

Issue 29333265: Issue 3478 - Hide genericblock and generichide from the composer (Closed)
Patch Set: Hide (instead disable) generichide and genericblock Created Jan. 6, 2016, 4:12 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 E("domainRestriction").value = docDomain; 131 E("domainRestriction").value = docDomain;
132 132
133 E("thirdParty").hidden = !thirdParty; 133 E("thirdParty").hidden = !thirdParty;
134 E("firstParty").hidden = thirdParty; 134 E("firstParty").hidden = thirdParty;
135 135
136 let typeGroup = E("typeGroup"); 136 let typeGroup = E("typeGroup");
137 let defaultTypes = RegExpFilter.prototype.contentType & ~RegExpFilter.typeMap. DOCUMENT; 137 let defaultTypes = RegExpFilter.prototype.contentType & ~RegExpFilter.typeMap. DOCUMENT;
138 let isDefaultType = (RegExpFilter.typeMap[item.type] & defaultTypes) != 0; 138 let isDefaultType = (RegExpFilter.typeMap[item.type] & defaultTypes) != 0;
139 for (let type of types) 139 for (let type of types)
140 { 140 {
141 if (type == "ELEMHIDE") 141 if (type == "ELEMHIDE" || type == "GENERICBLOCK" || type == "GENERICHIDE")
142 continue; 142 continue;
143 143
144 let typeNode = document.createElement("checkbox"); 144 let typeNode = document.createElement("checkbox");
145 typeNode.setAttribute("value", type.toLowerCase().replace(/\_/g, "-")); 145 typeNode.setAttribute("value", type.toLowerCase().replace(/\_/g, "-"));
146 typeNode.setAttribute("label", Utils.getString("type_label_" + type.toLowerC ase())); 146 typeNode.setAttribute("label", Utils.getString("type_label_" + type.toLowerC ase()));
147 147
148 let typeMask = RegExpFilter.typeMap[type]; 148 let typeMask = RegExpFilter.typeMap[type];
149 typeNode._defaultType = (typeMask & defaultTypes) != 0; 149 typeNode._defaultType = (typeMask & defaultTypes) != 0;
150 if ((isDefaultType && typeNode._defaultType) || (!isDefaultType && item.type == type)) 150 if ((isDefaultType && typeNode._defaultType) || (!isDefaultType && item.type == type))
151 typeNode.setAttribute("checked", "true"); 151 typeNode.setAttribute("checked", "true");
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld