Skip to content

Instantly share code, notes, and snippets.

@davlgd
Last active September 5, 2018 14:47
Show Gist options
  • Save davlgd/2212373cc16f9eeb2f54910daa863995 to your computer and use it in GitHub Desktop.
Save davlgd/2212373cc16f9eeb2f54910daa863995 to your computer and use it in GitHub Desktop.
Bad Search Engine Blocker - Script (étape 2)
chrome.webRequest.onBeforeRequest.addListener(function (request) {
const askedURL = new URL(request.url);
return { redirectUrl: "https://www.framabee.org?q=" + askedURL.searchParams.get("q")};
},
{ urls: ["https://*.google.com/*"] }, ["blocking"]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment