Created
March 6, 2025 17:32
-
-
Save qgustavor/c2dba88fdec3d2383310b1503d766065 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name Block DuckDuckGo's AI | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Add kbg=-1 and kbe=0 to DuckDuckGo URLs if missing | |
// @author qgustavor | |
// @match *://duckduckgo.com/* | |
// @grant none | |
// @installUrl https://gist.github.com/qgustavor/c2dba88fdec3d2383310b1503d766065/raw/no-duck-ai.user.js | |
// @updateUrl https://gist.github.com/qgustavor/c2dba88fdec3d2383310b1503d766065/raw/no-duck-ai.user.js | |
// ==/UserScript== | |
const newUrl = new URL(window.location.href) | |
const params = newUrl.searchParams | |
let needsReplace = false | |
if (!params.has('kbg')) { | |
params.set('kbg', '-1') | |
needsReplace = true | |
} | |
if (!params.has('kbe')) { | |
params.set('kbe', '0') | |
needsReplace = true | |
} | |
if (needsReplace) { | |
window.location.replace(newUrl.toString()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment