Last active
August 29, 2015 14:14
-
-
Save edcottrell/95673e86778d02ac213f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Webdesigner Depot Favorite Tweets of the Week - Add Image Links | |
// @namespace http://www.edcottrell.com/ | |
// @version 0.1 | |
// @description Makes images clickable in webdesignerdepot.com "Our Favorite Tweets of the Week" posts | |
// @author Ed Cottrell | |
// @match http://www.webdesignerdepot.com/*/our-favorite-tweets-of-the-week-* | |
// @grant none | |
// ==/UserScript== | |
jQuery( | |
function() { | |
jQuery('img.image-border') | |
.each(function() { | |
jQuery(this) | |
.wrap( | |
'<a href="' + | |
jQuery(this) | |
.parent() | |
.prev() | |
.children('a.twitter-timeline-link') | |
.prop('href') + | |
'" target="_blank"></a>' | |
); | |
} | |
); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment