Last active
September 5, 2018 14:48
-
-
Save davlgd/712db58e9556555cf9015994dfa155fd to your computer and use it in GitHub Desktop.
Bad Search Engine Blocker - Script (étape 3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chrome.webRequest.onBeforeRequest.addListener(function (request) { | |
| const askedURL = new URL(request.url); | |
| const keywords = askedURL.searchParams.get("q"); | |
| const destinationUrl = (keywords) ? "https://www.framabee.org?q=" + keywords : "https://www.framabee.org"; | |
| return { redirectUrl: destinationUrl }; | |
| }, | |
| { urls: ["https://*.google.com/*"] }, ["blocking"]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment