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

Side by Side Diff: ext/background.js

Issue 29522601: Noissue - Use includes instead of indexOf (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Aug. 21, 2017, 11:16 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 | « no previous file | lib/devtools.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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 if (frame) 651 if (frame)
652 return frame.parent || null; 652 return frame.parent || null;
653 653
654 return frames.get(0) || null; 654 return frames.get(0) || null;
655 } 655 }
656 }; 656 };
657 } 657 }
658 658
659 return ext.onMessage._dispatch( 659 return ext.onMessage._dispatch(
660 message, sender, sendResponse 660 message, sender, sendResponse
661 ).indexOf(true) != -1; 661 ).includes(true);
662 }); 662 });
663 663
664 664
665 /* Storage */ 665 /* Storage */
666 666
667 ext.storage = { 667 ext.storage = {
668 get(keys, callback) 668 get(keys, callback)
669 { 669 {
670 chrome.storage.local.get(keys, callback); 670 chrome.storage.local.get(keys, callback);
671 }, 671 },
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 ext.windows = { 758 ext.windows = {
759 create(createData, callback) 759 create(createData, callback)
760 { 760 {
761 chrome.windows.create(createData, createdWindow => 761 chrome.windows.create(createData, createdWindow =>
762 { 762 {
763 afterTabLoaded(callback)(createdWindow.tabs[0]); 763 afterTabLoaded(callback)(createdWindow.tabs[0]);
764 }); 764 });
765 } 765 }
766 }; 766 };
767 }()); 767 }());
OLDNEW
« no previous file with comments | « no previous file | lib/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld