Mercurial > ec-userscripts
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 23:d7cfa95436f9 | 24:8ce6738a3a81 |
|---|---|
| 1 // ==UserScript== | |
| 2 // @name Tweetdeck large image | |
| 3 // @namespace https://myconan.net | |
| 4 // @version 1.0.0 | |
| 5 // @description No more stupid link for images in tweetdeck | |
| 6 // @author nanaya | |
| 7 // @match https://tweetdeck.twitter.com/* | |
| 8 // @grant none | |
| 9 // @downloadURL https://bitbucket.org/!api/2.0/snippets/nanaya1/TK64/tip/files/jiku-chu-direct-link.user.js | |
| 10 // ==/UserScript== | |
| 11 | |
| 12 ;(function() { | |
| 13 var $ = jQuery; | |
| 14 | |
| 15 $(document).off('.ec-userscript'); | |
| 16 $(document).on('click.ec-userscript', '.js-media-image-link', function(e) { | |
| 17 var $link = $(e.currentTarget); | |
| 18 var url = getComputedStyle($link[0]).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, '$2'); | |
| 19 $link.attr('href', url + ':orig'); | |
| 20 }); | |
| 21 }).call(); |
