Skip to content

Instantly share code, notes, and snippets.

@nordicdyno
Last active December 6, 2015 01:44
Show Gist options
  • Save nordicdyno/9ecac79fd0f1b8500e5b to your computer and use it in GitHub Desktop.
Save nordicdyno/9ecac79fd0f1b8500e5b to your computer and use it in GitHub Desktop.
proxy-images
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