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;i<a.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'; } } |
Jason Samuel is a visionary product leader and trusted advisor with a proven track record of shaping strategy and driving technology innovation. With extensive expertise in enterprise end-user computing, security, cloud, automation, and virtualization technologies, Jason has become a globally recognized authority in the IT industry. His career spans consulting for hundreds of Fortune 500 enterprises across diverse business sectors worldwide, delivering cutting-edge digital solutions from Citrix, Microsoft, VMware, Amazon, Google, and NVIDIA that seamlessly balance security with exceptional user experiences.
Jason’s leadership is amplified by his dedication to knowledge-sharing as an author, speaker, podcaster, and mentor within the global IT and technology community. Recognized with numerous prestigious awards, Jason’s contributions underscore his commitment to advancing technology and empowering organizations to achieve transformative results. Follow him on LinkedIn.
Thanks a lot for this article!
Hi Jason, I read your blogs and its quite good and eye opening for me. I need an input from…
I'm with Richard Powell and Andreas Mariotti. Things work if I do it the USB redirection way, but not with…
We see this behaviour with 2203 CU2 VDAs and while being happy, that there is at leasy an workaround without…
Saved my butt without playing around over dozens attempts to get that certificate installed! Thank you! <3 Chris