Created
November 9, 2014 16:50
-
-
Save maesa/33e136083d71d8025a09 to your computer and use it in GitHub Desktop.
Open imgur on reddit through webproxy.net
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 Reddit Internetsehat Bypasser | |
// @namespace None | |
// @version 0.1 | |
// @description Open imgur through webproxy.net | |
// @include http://*.reddit.com/* | |
// @include http://*.reddit.com/r/* | |
// ==/UserScript== | |
var links = document.getElementsByTagName("a"); //array | |
var regex = /^(https?:\/\/)(i\.)?(imgur\.com\/)(.+)$/i; | |
for (var i = 0, imax = links.length; i < imax; i++) { | |
links[i].href = links[i].href.replace(regex, "http://www.webproxy.net/view?q=" + encodeURI("$1$2$3$4")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment