Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added picshd.com support

  • Loading branch information...
commit 3ea563743fd048d26c593b8b4657e4e2ba1882ce 1 parent ba96129
@honestbleeps honestbleeps authored
Showing with 22 additions and 0 deletions.
  1. +22 −0 lib/reddit_enhancement_suite.user.js
View
22 lib/reddit_enhancement_suite.user.js
@@ -9400,6 +9400,28 @@ modules['showImages'] = {
modules['showImages'].createImageExpando(elem);
}
},
+ picshd: {
+ deferred: true,
+ hashRe:/^https?:\/\/(?:[i.]|[edge.]|[www.])*picshd.com\/([\w]{5,})(\..+)?$/i,
+ go: function() {},
+ detect: function(elem) {
+ var href = elem.href.toLowerCase();
+ return href.indexOf('picshd.com/') >= 0;
+ },
+ handleLink: function(elem) {
+ var groups = this.hashRe.exec(elem.href);
+ if (groups) {
+ this.handleInfo(elem, 'http://i.picshd.com/'+groups[1]+'.jpg');
+ }
+ },
+ handleInfo: function(elem, info) {
+ elem.type = 'IMAGE';
+ elem.src = info;
+ elem.href = info;
+ $(elem).closest('.thing').find('.thumbnail').attr('href',elem.href);
+ modules['showImages'].createImageExpando(elem);
+ }
+ },
minus: {
hashRe: /^http:\/\/min.us\/([\w]+)(?:#[\d+])?$/i,
calls: {},
Please sign in to comment.
Something went wrong with that request. Please try again.