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

Side by Side Diff: ext/background.js

Issue 29587555: Issue 5771 - ABP prevents loading of Edge about:flags page (Closed)
Patch Set: Created Oct. 24, 2017, 7:39 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 | no next file » | 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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 let page = null; 602 let page = null;
603 if (details.tabId != -1) 603 if (details.tabId != -1)
604 { 604 {
605 frame = ext.getFrame(details.tabId, frameId); 605 frame = ext.getFrame(details.tabId, frameId);
606 page = new Page({id: details.tabId}); 606 page = new Page({id: details.tabId});
607 } 607 }
608 608
609 if (ext.webRequest.onBeforeRequest._dispatch( 609 if (ext.webRequest.onBeforeRequest._dispatch(
610 url, type, page, frame).includes(false)) 610 url, type, page, frame).includes(false))
611 return {cancel: true}; 611 return {cancel: true};
612 }, {urls: ["<all_urls>"]}, ["blocking"]); 612 }, {urls: ["*://*/*"]}, ["blocking"]);
Oleksandr 2017/10/24 07:43:55 I have tested that this still works fine for both
613 613
614 614
615 /* Message passing */ 615 /* Message passing */
616 616
617 browser.runtime.onMessage.addListener((message, rawSender, sendResponse) => 617 browser.runtime.onMessage.addListener((message, rawSender, sendResponse) =>
618 { 618 {
619 let sender = {}; 619 let sender = {};
620 620
621 // Add "page" and "frame" if the message was sent by a content script. 621 // Add "page" and "frame" if the message was sent by a content script.
622 // If sent by popup or the background page itself, there is no "tab". 622 // If sent by popup or the background page itself, there is no "tab".
(...skipping 51 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 browser.windows.create(createData, createdWindow => 677 browser.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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld