Created
May 19, 2019 09:51
-
-
Save CynicalApe/7e14617a707b97bbe30ea6a39ef3c1e1 to your computer and use it in GitHub Desktop.
duck duck go wikifix
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 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