From 99ee2e36bac6a30ab2be43c4ce38606de3f8466e Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 20 Dec 2014 14:02:03 -0800 Subject: [PATCH] Don't expand webm or YouTube videos on js/expand-all-images.js --- js/expand-all-images.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/expand-all-images.js b/js/expand-all-images.js index 82ea6340..6d7b4ca0 100644 --- a/js/expand-all-images.js +++ b/js/expand-all-images.js @@ -23,6 +23,14 @@ onready(function(){ .text(_('Expand all images')) .click(function() { $('a img.post-image').each(function() { + // 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()[0].dataset.expanded) $(this).parent().click(); });