DDG HTML direct links

unwrap links on DuckDuckGo HTML version

  1. // ==UserScript==
  2. // @name DDG HTML direct links
  3. // @namespace https://codeberg.org/kiara/ddg-direct
  4. // @version 0.1
  5. // @description unwrap links on DuckDuckGo HTML version
  6. // @author Kiara Grouwstra
  7. // @match https://html.duckduckgo.com/*
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @grant none
  10. // @license BSD0
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. Array.from(document.getElementsByTagName('a')).forEach((link) => { link.href = Array.from(new URLSearchParams(link.href).values())[0]; })
  16. })();