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

Delta Between Two Patch Sets: chrome/content/ui/composer.js

Issue 4884233277407232: Issue 2257 - Replaced non-standard function expressions with ES6 arrow functions (Closed)
Left Patch Set: Created April 1, 2015, 2:24 p.m.
Right Patch Set: Rebased Created May 6, 2015, 10:46 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | chrome/content/ui/filters-backup.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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) ;
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
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 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld