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

Side by Side Diff: background.js

Issue 29573905: Issue 4580 - Replace ext.devtools with devtools Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Remove devtools.onCreated Created Oct. 11, 2017, 11:34 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
« no previous file with comments | « no previous file | devtools-panel.js » ('j') | ext/content.js » ('J')
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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 { 534 {
535 host, 535 host,
536 whitelisted: isWhitelisted 536 whitelisted: isWhitelisted
537 } 537 }
538 ] 538 ]
539 } 539 }
540 }, "*"); 540 }, "*");
541 }, 1000); 541 }, 1000);
542 } 542 }
543 543
544 ext.devtools.onCreated.addListener((panel) => 544 let {port} = require("messaging");
545
546 port.on("devtools.ready", (message, sender) =>
Manish Jethani 2017/10/11 23:37:33 There's no API called devtools.onCreated. This is
545 { 547 {
548 let panel = sender.page;
549
546 // blocked request 550 // blocked request
547 panel.sendMessage({ 551 panel.sendMessage({
548 type: "add-record", 552 type: "add-record",
549 request: { 553 request: {
550 url: "http://adserver.example.com/ad_banner.png", 554 url: "http://adserver.example.com/ad_banner.png",
551 type: "IMAGE", 555 type: "IMAGE",
552 docDomain: "example.com" 556 docDomain: "example.com"
553 }, 557 },
554 filter: { 558 filter: {
555 text: "/ad_banner*$domain=example.com", 559 text: "/ad_banner*$domain=example.com",
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 }, 615 },
612 filter: { 616 filter: {
613 text: "||example.com/some-annoying-popup$popup", 617 text: "||example.com/some-annoying-popup$popup",
614 whitelisted: false, 618 whitelisted: false,
615 userDefined: true, 619 userDefined: true,
616 subscription: null 620 subscription: null
617 } 621 }
618 }); 622 });
619 }); 623 });
620 }()); 624 }());
OLDNEW
« no previous file with comments | « no previous file | devtools-panel.js » ('j') | ext/content.js » ('J')

Powered by Google App Engine
This is Rietveld