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

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

Issue 4884233277407232: Issue 2257 - Replaced non-standard function expressions with ES6 arrow functions (Closed)
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:
View unified diff | Download patch
« no previous file with comments | « chrome/content/ui/sidebar.js ('k') | 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 messageElement.removeAttribute("invisible"); 210 messageElement.removeAttribute("invisible");
211 addMainCheckbox.removeAttribute("invisible"); 211 addMainCheckbox.removeAttribute("invisible");
212 212
213 let [, beforeLink, afterLink] = /(.*)\?1\?(.*)/.exec(messageElement.getAttri bute("_textTemplate")) || [null, messageElement.getAttribute("_textTemplate"), " "]; 213 let [, beforeLink, afterLink] = /(.*)\?1\?(.*)/.exec(messageElement.getAttri bute("_textTemplate")) || [null, messageElement.getAttribute("_textTemplate"), " "];
214 while (messageElement.firstChild) 214 while (messageElement.firstChild)
215 messageElement.removeChild(messageElement.firstChild); 215 messageElement.removeChild(messageElement.firstChild);
216 messageElement.appendChild(document.createTextNode(beforeLink)); 216 messageElement.appendChild(document.createTextNode(beforeLink));
217 let link = document.createElement("label"); 217 let link = document.createElement("label");
218 link.className = "text-link"; 218 link.className = "text-link";
219 link.setAttribute("tooltiptext", mainSubscriptionURL); 219 link.setAttribute("tooltiptext", mainSubscriptionURL);
220 link.addEventListener("click", function() UI.loadInBrowser(mainSubscriptionU RL), false); 220 link.addEventListener("click", () => UI.loadInBrowser(mainSubscriptionURL), false);
221 link.textContent = mainSubscriptionTitle; 221 link.textContent = mainSubscriptionTitle;
222 messageElement.appendChild(link); 222 messageElement.appendChild(link);
223 messageElement.appendChild(document.createTextNode(afterLink)); 223 messageElement.appendChild(document.createTextNode(afterLink));
224 224
225 addMainCheckbox.value = mainSubscriptionURL; 225 addMainCheckbox.value = mainSubscriptionURL;
226 addMainCheckbox.setAttribute("_mainSubscriptionTitle", mainSubscriptionTitle ) 226 addMainCheckbox.setAttribute("_mainSubscriptionTitle", mainSubscriptionTitle )
227 let [label, accesskey] = Utils.splitLabel(addMainCheckbox.getAttribute("_lab elTemplate")); 227 let [label, accesskey] = Utils.splitLabel(addMainCheckbox.getAttribute("_lab elTemplate"));
228 addMainCheckbox.label = label.replace(/\?1\?/g, mainSubscriptionTitle); 228 addMainCheckbox.label = label.replace(/\?1\?/g, mainSubscriptionTitle);
229 addMainCheckbox.accessKey = accesskey; 229 addMainCheckbox.accessKey = accesskey;
230 } 230 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 subscription.disabled = false; 298 subscription.disabled = false;
299 subscription.title = title; 299 subscription.title = title;
300 300
301 if (subscription instanceof DownloadableSubscription && !subscription.lastDown load) 301 if (subscription instanceof DownloadableSubscription && !subscription.lastDown load)
302 Synchronizer.execute(subscription); 302 Synchronizer.execute(subscription);
303 } 303 }
304 304
305 function hasSubscription(url) 305 function hasSubscription(url)
306 { 306 {
307 return FilterStorage.subscriptions.some(function(subscription) subscription in stanceof DownloadableSubscription && subscription.url == url); 307 return FilterStorage.subscriptions.some(subscription => subscription instanceo f DownloadableSubscription && subscription.url == url);
308 } 308 }
OLDNEW
« no previous file with comments | « chrome/content/ui/sidebar.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld