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

Side by Side Diff: chrome/content/ui/flasher.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/filters-subscriptionview.js ('k') | chrome/content/ui/sendReport.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 10 matching lines...) Expand all
21 21
22 var flasher = { 22 var flasher = {
23 nodes: null, 23 nodes: null,
24 count: 0, 24 count: 0,
25 timer: null, 25 timer: null,
26 26
27 flash: function(nodes) 27 flash: function(nodes)
28 { 28 {
29 this.stop(); 29 this.stop();
30 if (nodes) 30 if (nodes)
31 nodes = nodes.filter(function(node) node.nodeType == Node.ELEMENT_NODE); 31 nodes = nodes.filter(node => node.nodeType == Node.ELEMENT_NODE);
32 if (!nodes || !nodes.length) 32 if (!nodes || !nodes.length)
33 return; 33 return;
34 34
35 if (Prefs.flash_scrolltoitem && nodes[0].ownerDocument) 35 if (Prefs.flash_scrolltoitem && nodes[0].ownerDocument)
36 { 36 {
37 // Ensure that at least one node is visible when flashing 37 // Ensure that at least one node is visible when flashing
38 let wnd = nodes[0].ownerDocument.defaultView; 38 let wnd = nodes[0].ownerDocument.defaultView;
39 try 39 try
40 { 40 {
41 let topWnd = Utils.getChromeWindow(wnd); 41 let topWnd = Utils.getChromeWindow(wnd);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 switchOn: function() 99 switchOn: function()
100 { 100 {
101 this.setOutline("#CC0000 dotted 2px", "-2px"); 101 this.setOutline("#CC0000 dotted 2px", "-2px");
102 }, 102 },
103 103
104 switchOff: function() 104 switchOff: function()
105 { 105 {
106 this.setOutline("", ""); 106 this.setOutline("", "");
107 } 107 }
108 }; 108 };
OLDNEW
« no previous file with comments | « chrome/content/ui/filters-subscriptionview.js ('k') | chrome/content/ui/sendReport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld