Update lib/reddit_enhancement_suite.user.js

- Added image expando support for quickmeme's mobile domain

- Also added an "add captions" feature for quickmeme links

A nuisance for people with RES who are interested in participating in communities such as the AdviceAnimals subreddit is that there is no straightforward way to add captions to anything they see, because links modified by RES point straight to an image rather than a page with a captioning ability. Consequently, RES users have a somewhat crippled experience in these communities.

This modification removes that problem by using a middleman domain (resme.me) with nuanced HTTP header detection which determines whether the URL was loaded in an expando or in its own window/tab.

When determined to be expando/inline, resme.me directs straight to the quickmeme image (which is the current behavior of RES). When determined to be its own window/tab, it instead serves an HTML page containing the image and a small and unobtrusive "add captions" button which dynamically embeds an HTML5-friendly, no-Flash-required image captioning script when clicked.

The server errs on the side of caution by only serving HTML if it is 100% certain the image link was loaded in its own window/tab. Otherwise it falls back on normal image loading.

Example link: http://www.quickmeme.com/meme/3odhnx/
Current RES-converted link: http://i.qkme.me/3odhnx.jpg
New RES-converted link: http://resme.me/3odhnx.jpg

It has been tested in Opera, Firefox, Chrome, Safari, and IE 7/8/9.

The modification is barely noticeable to people who don't care about adding their own captions to anything, while giving the captioning ability back to people who do care.

resme.me is hosted on a dedicated softlayer server with a 2 Gbps uplink and 10 TB/month bandwidth allotment. I think it would be cool to make this eventually work with other meme sites too, but I started with quickmeme because it's the most popular. Let me know what you guys think!