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

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

Issue 29333254: Issue 3459 - Don't duplicate content type definition (Closed)
Patch Set: Created Jan. 6, 2016, 1:29 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 | chrome/content/ui/sidebar.js » ('j') | 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 { 112 {
113 // IOService returned nsIURI - not much we can do with it 113 // IOService returned nsIURI - not much we can do with it
114 addSuggestion(item.location); 114 addSuggestion(item.location);
115 E("patternGroup").value = ""; 115 E("patternGroup").value = "";
116 } 116 }
117 if (Prefs.composer_default == 0) 117 if (Prefs.composer_default == 0)
118 E("customPattern").focus(); 118 E("customPattern").focus();
119 else 119 else
120 E("patternGroup").focus(); 120 E("patternGroup").focus();
121 121
122 let types = Array.from(Policy.contentTypes); 122 let types = Array.from(new Set(Policy.contentTypes.values()));
123 types.sort(); 123 types.sort();
124 124
125 let docDomain = item.docDomain; 125 let docDomain = item.docDomain;
126 let thirdParty = item.thirdParty; 126 let thirdParty = item.thirdParty;
127 127
128 if (docDomain) 128 if (docDomain)
129 docDomain = docDomain.replace(/^www\./i, "").replace(/\.+$/, ""); 129 docDomain = docDomain.replace(/^www\./i, "").replace(/\.+$/, "");
130 if (docDomain) 130 if (docDomain)
131 E("domainRestriction").value = docDomain; 131 E("domainRestriction").value = docDomain;
132 132
(...skipping 260 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 | chrome/content/ui/sidebar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld