Skip to content

Instantly share code, notes, and snippets.

@gamefreak
Created May 2, 2012 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gamefreak/2581022 to your computer and use it in GitHub Desktop.
Save gamefreak/2581022 to your computer and use it in GitHub Desktop.
diff --git a/lib/reddit_enhancement_suite.user.js b/lib/reddit_enhancement_suite.user.js
index 63409e5..ed514e8 100644
--- a/lib/reddit_enhancement_suite.user.js
+++ b/lib/reddit_enhancement_suite.user.js
@@ -8386,6 +8386,11 @@ modules['showImages'] = {
value: true,
description: 'Mark links visited when you view images (does eat some resources).'
},
+ preserveThumbnailLink: {
+ type: 'boolean',
+ value: false,
+ description: 'Preserve the original link when clicking on the thumbnail. (Enabling this may prevent the link from turning purple when you click on the thumbnail)'
+ },
ignoreDuplicates: {
type: 'boolean',
value: true,
@@ -8741,6 +8746,11 @@ modules['showImages'] = {
});
}
+ //So the link gets colored when clicking the thumbnail
+ if (!modules['showImages'].options['preserveThumbnailLink'].value) {
+ $(elem).closest('.thing').find('.thumbnail').attr('href', elem.href);
+ }
+
//This should not be reached in the case of duplicates
elem.name = 'img'+this.imagesRevealed[href];
this.imageList.push(elem);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment