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

Side by Side Diff: ext/background.js

Issue 29808587: Issue 6717 - Part 1: run eslint through npm (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Use eslint5. Fix eslint error. Created July 13, 2018, 3:04 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
« README.md ('K') | « README.md ('k') | package.json » ('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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // but sometimes we only have the tab id when we create a Page object. 88 // but sometimes we only have the tab id when we create a Page object.
89 // In that case we get the url from top frame of the tab, recorded by 89 // In that case we get the url from top frame of the tab, recorded by
90 // the onBeforeRequest handler. 90 // the onBeforeRequest handler.
91 let frames = framesOfTabs.get(this.id); 91 let frames = framesOfTabs.get(this.id);
92 if (frames) 92 if (frames)
93 { 93 {
94 let frame = frames.get(0); 94 let frame = frames.get(0);
95 if (frame) 95 if (frame)
96 return frame.url; 96 return frame.url;
97 } 97 }
98
99 return undefined;
kzar 2018/08/08 11:15:19 This looks like an unrelated change? If not could
hub 2018/08/14 11:37:03 Without it eslint show an error 81:12 error E
98 }, 100 },
99 sendMessage(message, responseCallback) 101 sendMessage(message, responseCallback)
100 { 102 {
101 browser.tabs.sendMessage(this.id, message, responseCallback); 103 browser.tabs.sendMessage(this.id, message, responseCallback);
102 } 104 }
103 }; 105 };
104 106
105 ext.getPage = id => new Page({id: parseInt(id, 10)}); 107 ext.getPage = id => new Page({id: parseInt(id, 10)});
106 108
107 ext.pages = { 109 ext.pages = {
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 return frames.get(0) || null; 568 return frames.get(0) || null;
567 } 569 }
568 }; 570 };
569 } 571 }
570 572
571 return ext.onMessage._dispatch( 573 return ext.onMessage._dispatch(
572 message, sender, sendResponse 574 message, sender, sendResponse
573 ).includes(true); 575 ).includes(true);
574 }); 576 });
575 } 577 }
OLDNEW
« README.md ('K') | « README.md ('k') | package.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld