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

Side by Side Diff: lib/devtools.js

Issue 29417555: Issue 5130 - Changes url protocol permissions to all urls (Closed)
Patch Set: fix redundancies introduced in last patch Created April 19, 2017, 12:21 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 | « ext/background.js ('k') | lib/popupBlocker.js » ('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-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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 let match = newPort.name.match(/^devtools-(\d+)$/); 339 let match = newPort.name.match(/^devtools-(\d+)$/);
340 if (!match) 340 if (!match)
341 return; 341 return;
342 342
343 let inspectedTabId = parseInt(match[1], 10); 343 let inspectedTabId = parseInt(match[1], 10);
344 let localOnBeforeRequest = onBeforeRequest.bind(); 344 let localOnBeforeRequest = onBeforeRequest.bind();
345 345
346 chrome.webRequest.onBeforeRequest.addListener( 346 chrome.webRequest.onBeforeRequest.addListener(
347 localOnBeforeRequest, 347 localOnBeforeRequest,
348 { 348 {
349 urls: ["<all_urls>"], 349 urls: ["http://*/*", "https://*/*"],
350 types: ["main_frame"], 350 types: ["main_frame"],
351 tabId: inspectedTabId 351 tabId: inspectedTabId
352 } 352 }
353 ); 353 );
354 354
355 if (!hasPanels()) 355 if (!hasPanels())
356 { 356 {
357 ext.pages.onLoading.addListener(onLoading); 357 ext.pages.onLoading.addListener(onLoading);
358 FilterNotifier.on("filter.added", onFilterAdded); 358 FilterNotifier.on("filter.added", onFilterAdded);
359 FilterNotifier.on("filter.removed", onFilterRemoved); 359 FilterNotifier.on("filter.removed", onFilterRemoved);
(...skipping 17 matching lines...) Expand all
377 panels[inspectedTabId] = {port: newPort, records: []}; 377 panels[inspectedTabId] = {port: newPort, records: []};
378 }); 378 });
379 379
380 port.on("devtools.traceElemHide", (message, sender) => 380 port.on("devtools.traceElemHide", (message, sender) =>
381 { 381 {
382 logHiddenElements( 382 logHiddenElements(
383 sender.page, message.selectors, message.filters, 383 sender.page, message.selectors, message.filters,
384 extractHostFromFrame(sender.frame) 384 extractHostFromFrame(sender.frame)
385 ); 385 );
386 }); 386 });
OLDNEW
« no previous file with comments | « ext/background.js ('k') | lib/popupBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld