Last active
December 6, 2015 01:44
-
-
Save nordicdyno/9ecac79fd0f1b8500e5b to your computer and use it in GitHub Desktop.
proxy-images
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
javascript:(function() { | |
var proxyUrl = "http://d-nordicdyno.sports.ru/dl"; | |
function replaceImages() { | |
var imgs = document.getElementsByTagName('img'); | |
for (var i = 0; i < imgs.length; i++) { | |
var src = imgs[i].src; | |
if (src.indexOf("url=?") > -1) { | |
continue; | |
} | |
if (!/\.(jpg|jpeg|png|gif)$/.test(src)) { | |
continue; | |
} | |
imgs[i].src = proxyUrl + "?url=" + src; | |
} | |
}; | |
replaceImages(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment