Skip to content

Instantly share code, notes, and snippets.

View Dry7's full-sized avatar

Andrey Shilov Dry7

View GitHub Profile
@Dry7
Dry7 / redirects.js
Last active October 11, 2018 00:47
const CDP = require('chrome-remote-interface');
CDP(async (client) => {
const {Network, Page, Target} = client;
Network.requestWillBeSent(({request, redirectResponse}) => {
console.log((redirectResponse || {}).url + ' -> ' + request.url);
});
Target.targetCreated((params) => {
if(params.targetInfo.type != "page") {