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

Delta Between Two Patch Sets: chrome/ext/background.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Left Patch Set: Remove some unnecessary changes Created March 23, 2017, 9:29 a.m.
Right Patch Set: Use .includes again Created March 31, 2017, 8:37 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « chrome/devtools.js ('k') | chrome/ext/common.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 let results = ext.webRequest.onBeforeRequest._dispatch( 536 let results = ext.webRequest.onBeforeRequest._dispatch(
537 new URL(details.url), 537 new URL(details.url),
538 type.toUpperCase(), 538 type.toUpperCase(),
539 new Page({id: details.tabId}), 539 new Page({id: details.tabId}),
540 frame 540 frame
541 ); 541 );
542 542
543 if (results.indexOf(false) != -1) 543 if (results.indexOf(false) != -1)
544 return {cancel: true}; 544 return {cancel: true};
545 } 545 }
546 }, {urls: ["http://*/*", "https://*/*"]}, ["blocking"]); 546 }, {urls: ["<all_urls>"]}, ["blocking"]);
547 547
548 548
549 /* Message passing */ 549 /* Message passing */
550 550
551 chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) => 551 chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) =>
552 { 552 {
553 let sender = {}; 553 let sender = {};
554 554
555 // Add "page" and "frame" if the message was sent by a content script. 555 // Add "page" and "frame" if the message was sent by a content script.
556 // If sent by popup or the background page itself, there is no "tab". 556 // If sent by popup or the background page itself, there is no "tab".
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 ext.windows = { 674 ext.windows = {
675 create(createData, callback) 675 create(createData, callback)
676 { 676 {
677 chrome.windows.create(createData, createdWindow => 677 chrome.windows.create(createData, createdWindow =>
678 { 678 {
679 afterTabLoaded(callback)(createdWindow.tabs[0]); 679 afterTabLoaded(callback)(createdWindow.tabs[0]);
680 }); 680 });
681 } 681 }
682 }; 682 };
683 }()); 683 }());
LEFTRIGHT

Powered by Google App Engine
This is Rietveld