Extensions:
Chrome (unlisted):
https://chrome.google.com/webstore/detail/gh-imgur-fix/ckkmbgkaejlabflnopigihodicamibjn
Firefox (all platforms - experimental tag):
https://addons.mozilla.org/en-US/firefox/addon/gh-imgur-fix/
Safari (hosted on Github - unpublished - proxy method):
https://github.com/homerowco/GHimgurFix/raw/master/ext/safari/dist/craycopy.safariextz
Source:
Source Repo:
https://github.com/homerowco/GHimgurFix
Stack:
Simple PHP proxy script that runs on a AWS Elastic Beanstalk which is proxied by Cloudflare to cache everything going through assuring a 100% CDN cache rate.
The Chrome extension is a content match injection on *geekhack.org* that replaces all imgur images and links (zoom) with the same source but adds the proxy domain in front of it.
It's currently running on craycopy.com (random old domain) and since it's all cached via Cloudflare it's not really costing me much besides the $5/mo for the nano EB instance.
Update: The extensions are now serverless and modify the request header on demand! Much better, much faster.
Want to change something? Pull request! :)
Example:
Broken:
More
https://i.imgur.com/Tiur5Eg.jpg
(https://i.imgur.com/Tiur5Eg.jpg)
Fixed (old proxy):
More
https://craycopy.com/i/https://i.imgur.com/Tiur5Eg.jpg
(https://craycopy.com/i/https://i.imgur.com/Tiur5Eg.jpg)
JS Alternatives:
Update: I tried to modify the request headers via jquery/native and it's not possible. All modern browsers refuse the editing of request headers. The proxy url rewrite method is still the only working one for directly inside the website implementation without installing the extensions.
jQuery (avail. on GH):
$(function(){
var f='://i.imgur.com/',r='https://craycopy.com/';
$.each([['img.bbc_img[','src'],['a.highslide[','href']],function(k,v){
$(v[0]+v[1]+'*="'+f+'"]').each(function(){var t=$(this),s=t.attr(v[1]);-1===s.indexOf(r)&&t.attr(v[1],r+'i/'+s)});
});
});
Vanilla:
(function(){
var f='://i.imgur.com/',r='https://craycopy.com/',a=[['img.bbc_img[','src'],['a.highslide[','href']],g,h,x;
for(g in a){for(h of document.querySelectorAll(a[g][0]+a[g][1]+'*="'+f+'"]'))(x=h[a[g][1]])&&-1===x.indexOf(r)&&(h[a[g][1]]=r+'i/'+x)}
})();