comparison tweetdeck-large-image.user.js @ 25:06d7972287c1

(none)
author Edho Arief <me@myconan.net>
date Tue, 17 Nov 2015 11:01:09 +0000
parents 8ce6738a3a81
children 6ff29abe127d
comparison
equal deleted inserted replaced
24:8ce6738a3a81 25:06d7972287c1
11 11
12 ;(function() { 12 ;(function() {
13 var $ = jQuery; 13 var $ = jQuery;
14 14
15 $(document).off('.ec-userscript'); 15 $(document).off('.ec-userscript');
16 $(document).on('click.ec-userscript', '.js-media-image-link', function(e) { 16 $(document).on('mouseenter.ec-userscript', '.js-media-image-link', function(e) {
17 var $link = $(e.currentTarget); 17 var link = e.currentTarget;
18 var url = getComputedStyle($link[0]).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, '$2'); 18 if (link._ecUserscript === true) { return; }
19 $link.attr('href', url + ':orig'); 19
20 var url = getComputedStyle(link).backgroundImage.replace(/^url\(('|")?(.+?)(:small)?\1\)$/, '$2');
21 link.setAttribute('href', url + ':orig');
22 link._ecUserscript = true;
20 }); 23 });
21 }).call(); 24 }).call();