Sometimes you can’t get to an image host because it is down or has exceeded it’s allotted bandwidth. If the host has a mirror (many do these days), you can use this Greasemonkey script to pass requests to the mirror automatically.
Just replace “originalimagehost” and “newmirror” with the correct names and replace “domain” with the name of the sites you want the script to run on and it should work. Most mirrors I have seen have a script path so add that in under “scriptpath” if yours does or remove it if it doesn’t:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
// ==UserScript== // @name imagehost redirect // @namespace imagehost redirect // @description Replaces all primary image host links with mirror links // @include http://*.domain.com/* // @include http://domain.com/* // ==/UserScript== var a = document.getElementsByTagName('a'); for (i=0;ia.length;i++) { p = /originalimagehost\.com\/([A-Za-z0-9]+)/; res = p.exec(a[i]); if (res!=null) { a[i].href = 'http://www.newmirror.com/scriptpath/?' + res[1] + '.jpg'; } } |