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
|
26
|
9 // @downloadURL https://bitbucket.org/!api/2.0/snippets/nanaya1/TK64/tip/files/tweetdeck-large-image.user.js
|
24
|
10 // ==/UserScript==
|
|
11
|
|
12 ;(function() {
|
|
13 var $ = jQuery;
|
|
14
|
|
15 $(document).off('.ec-userscript');
|
25
|
16 $(document).on('mouseenter.ec-userscript', '.js-media-image-link', function(e) {
|
|
17 var link = e.currentTarget;
|
|
18 if (link._ecUserscript === true) { return; }
|
|
19
|
|
20 var url = getComputedStyle(link).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, '$2');
|
|
21 link.setAttribute('href', url + ':orig');
|
|
22 link._ecUserscript = true;
|
24
|
23 });
|
|
24 }).call(); |