Skip to content

Instantly share code, notes, and snippets.

@abnrk
Last active January 19, 2026 14:28
Show Gist options
  • Select an option

  • Save abnrk/122a23d6d90c72d2ed7ccb98de705dbc to your computer and use it in GitHub Desktop.

Select an option

Save abnrk/122a23d6d90c72d2ed7ccb98de705dbc to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Yahoo Anti-Redirect
// @namespace Violentmonkey Scripts
// @match https://*.yahoo.com/search*
// @grant none
// @version 1.0
// @author Adudo
// @description Replaces Yahoo redirect URLs with direct links
// ==/UserScript==
var links = document.getElementsByTagName("a");
for(elem of links) {
if(elem.href.includes("r.search.yahoo.com")) {
var url = new URL(elem.href);
elem.href = decodeURIComponent(url.pathname.slice(1).split("/")[4].slice(3));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment