24
|
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(); |