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

Delta Between Two Patch Sets: ext/background.js

Issue 29808587: Issue 6717 - Part 1: run eslint through npm (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Left Patch Set: Use eslint4 and eyeo eslint 2.0.0. Rename task to "lint" Created July 13, 2018, 2:14 p.m.
Right Patch Set: Require eslint-config-eyeo 2.1.0 Created Aug. 14, 2018, 11:36 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « README.md ('k') | package.json » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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;
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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 return frames.get(0) || null; 601 return frames.get(0) || null;
600 } 602 }
601 }; 603 };
602 } 604 }
603 605
604 return ext.onMessage._dispatch( 606 return ext.onMessage._dispatch(
605 message, sender, sendResponse 607 message, sender, sendResponse
606 ).includes(true); 608 ).includes(true);
607 }); 609 });
608 } 610 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld