honestbleeps/Reddit-Enhancement-Suite — pull request #733 by dylanwenzlau (2014-01-19 22:26:48+00:00)
Title: Added imgflip.com support for inline image viewer

disclaimer: I run imgflip.com

Thanks in advance for reviewing this! I tried to make this as minimal as possible. It appears that adding support for new sites still adds processing time at O(n), but I tested this regex speed in chrome, and it looks like you'd have to run it on 1000 URLs before hitting 1ms added time, regardless of URL length.

This was a good excuse to change imgflip GIF pages to use /gif/ instead of /i/, so they can be identified easier. I didn't want to add any API calls or image.onerror handlers to RES just to determine what extension the image had.