Mercurial > ec-userscripts
diff tweetdeck-large-image.user.js @ 24:8ce6738a3a81
(none)
author | Edho Arief <me@myconan.net> |
---|---|
date | Tue, 17 Nov 2015 10:56:29 +0000 |
parents | |
children | 06d7972287c1 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tweetdeck-large-image.user.js Tue Nov 17 10:56:29 2015 +0000 @@ -0,0 +1,21 @@ +// ==UserScript== +// @name Tweetdeck large image +// @namespace https://myconan.net +// @version 1.0.0 +// @description No more stupid link for images in tweetdeck +// @author nanaya +// @match https://tweetdeck.twitter.com/* +// @grant none +// @downloadURL https://bitbucket.org/!api/2.0/snippets/nanaya1/TK64/tip/files/jiku-chu-direct-link.user.js +// ==/UserScript== + +;(function() { + var $ = jQuery; + + $(document).off('.ec-userscript'); + $(document).on('click.ec-userscript', '.js-media-image-link', function(e) { + var $link = $(e.currentTarget); + var url = getComputedStyle($link[0]).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, '$2'); + $link.attr('href', url + ':orig'); + }); +}).call(); \ No newline at end of file