0
How to manipulate a url request before opening the page on google Chrome? Searching I found how to block the request of a specific url, but I’m a little confused with how to manipulate the url and redirect.
Example blocking link protector url ouo.io
:
chrome.webRequest.onBeforeRequest.addListener(
function(detalhes) {
return {cancel: detalhes.url.indexOf("://ouo.io/") != -1};
},
{ urls: ["<all_urls>"] },
["blocking"]
);
However I would like to manipulate the URL in some cases, example take the URL of a parameter and redirect: ?s=
http://ouo.io/s/1XTIn2cB?s=https://google.com