diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2016-09-25 16:34:47 +0900 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2016-09-25 16:34:47 +0900 |
| commit | a3b9c4405c6d4cca2a70dbb400e3ba3f65e7ea04 (patch) | |
| tree | 5a2ebdb801748586e3fde7c12cbeda169b2c3e31 /js/expand-all-images.js | |
| parent | 9436524a306c8e3d6d8a6ed195e2a3c56d5cde39 (diff) | |
| parent | a4b619ae5eaab5755dc215a496854dee8f7ce395 (diff) | |
Merged lainchan with vichan master at 25/9/2016 a4b619ae5eaab5755dc215a496854dee8f7ce395 @czaks czaks committed on GitHub 2 days ago
Diffstat (limited to 'js/expand-all-images.js')
| -rw-r--r-- | js/expand-all-images.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/js/expand-all-images.js b/js/expand-all-images.js index 5545045c..c110f51c 100644 --- a/js/expand-all-images.js +++ b/js/expand-all-images.js @@ -23,7 +23,15 @@ onready(function(){ .text(_('Expand all images')) .click(function() { $('a img.post-image').each(function() { - if (!$(this).parent()[0].dataset.expanded) + // Don't expand YouTube embeds + if ($(this).parent().parent().hasClass('video-container')) + return; + + // or WEBM + if (/^\/player\.php\?/.test($(this).parent().attr('href'))) + return; + + if (!$(this).parent().data('expanded')) $(this).parent().click(); }); @@ -34,8 +42,8 @@ onready(function(){ $('div#shrink-all-images a') .text(_('Shrink all images')) .click(function(){ - $('a img.post-image').each(function() { - if ($(this).parent()[0].dataset.expanded) + $('a img.full-image').each(function() { + if ($(this).parent().data('expanded')) $(this).parent().click(); }); $(this).parent().remove(); |
