summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
author8chan <admin@8chan.co>2014-12-20 14:02:03 -0800
committerczaks <marcin@6irc.net>2016-05-05 12:06:27 +0200
commit99ee2e36bac6a30ab2be43c4ce38606de3f8466e (patch)
tree77fc7aa2941198a9b4a9b35e095ea26149a9a1b1 /js
parenta723ff8e66e88f0e98b893275b8f7b1bbc990514 (diff)
Don't expand webm or YouTube videos on js/expand-all-images.js
Diffstat (limited to 'js')
-rw-r--r--js/expand-all-images.js8
1 files changed, 8 insertions, 0 deletions
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();
});