Prevents Imgur from redirecting direct media URLs to their HTML page, keeping the correct file extension for images, GIFs and videos. Thanks to /u/american_spacey (https://www.reddit.com/r/firefox/comments/1exswyv/comment/lja7yc7/) for improvements.
This script aims to 'fix' Imgur's annoying behavior of redirecting direct image/media links to their HTML pages. This script will redirect them back to the direct media link pages, with the correct file extensions.