Created
July 9, 2023 20:46
-
-
Save keb/69005d2a4df0c6aa81f4423b309cfaf0 to your computer and use it in GitHub Desktop.
This file contains 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 Remove tracking links on duckduckgo.com HTML version | |
// @namespace Violentmonkey Scripts | |
// @match https://html.duckduckgo.com/html/ | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 7/9/2023, 4:36:51 PM | |
// @run-at document-idle | |
// ==/UserScript== | |
let links = document.querySelectorAll('.result__a, .result__snippet, .result__url'); | |
for (let i = 0; i < links.length; i++) { | |
let link = links[i]; | |
let clean = link.href.replace(/^https:\/\/duckduckgo\.com\/l\/\?uddg=|&rut.*$/g, ''); | |
link.href = decodeURIComponent(clean); | |
} |
@sergeevabc it seems to still work for me. reminder that this is only for the HTML version: https://html.duckduckgo.com/html/
I no longer use DDG for what it's worth (switched back to Google)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does it still work on your end, @keb? Looks like it needs an update.