Skip to content

Instantly share code, notes, and snippets.

@CynicalApe
Created May 19, 2019 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CynicalApe/7e14617a707b97bbe30ea6a39ef3c1e1 to your computer and use it in GitHub Desktop.
Save CynicalApe/7e14617a707b97bbe30ea6a39ef3c1e1 to your computer and use it in GitHub Desktop.
duck duck go wikifix
// ==UserScript==
// @name Wikifix
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://duckduckgo.com/*
// @grant none
// ==/UserScript==
window.onload = function () {
document.querySelectorAll("a").forEach(element => {
element.href = element.href.replace("https://en.wikipedia.org/",
"https://en.0wikipedia.org/");
});
var x = document.title;
if (x == "Redirect Notice") {
var link = document.querySelector("a");
var linkstring = link + "";
if (linkstring.includes("https://en.0wikipedia.org/")) {
document.querySelector("a").click();
}
} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment