diff --git a/4chan_x.user.js b/4chan_x.user.js index c9af8df0a..da28b1a03 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3650,7 +3650,7 @@ var img, src; if (post.root.hidden || !post.img) return; src = post.img.parentNode.href; - if (/gif$/.test(src) && !/spoiler/.test(src)) { + if (/gif$/.test(src) && !/spoiler/.test(post.img.src)) { img = $.el('img'); $.on(img, 'load', function() { return post.img.src = src; @@ -4301,15 +4301,15 @@ img[md5], img[md5] + img {\ width: 100%;\ }\ /* revealed spoilers do not have height/width,\ - this fixed "expanded" auto-gifs */\ + this fixes "expanded" auto-gifs */\ img[md5] {\ - max-height: 251px;\ - max-width: 251px;\ -}\ -td > .filesize > img[md5] {\ max-height: 126px;\ max-width: 126px;\ }\ +.filesize:first-child ~ a > img[md5] {\ + max-height: 251px;\ + max-width: 251px;\ +}\ \ #qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks {\ position: fixed;\ diff --git a/script.coffee b/script.coffee index d830bd6ed..36236844b 100644 --- a/script.coffee +++ b/script.coffee @@ -3037,7 +3037,7 @@ AutoGif = node: (post) -> return if post.root.hidden or not post.img src = post.img.parentNode.href - if /gif$/.test(src) and !/spoiler/.test src + if /gif$/.test(src) and !/spoiler/.test post.img.src img = $.el 'img' $.on img, 'load', -> # Replace the thumbnail once the GIF has finished loading. @@ -3637,15 +3637,15 @@ img[md5], img[md5] + img { width: 100%; } /* revealed spoilers do not have height/width, - this fixed "expanded" auto-gifs */ + this fixes "expanded" auto-gifs */ img[md5] { - max-height: 251px; - max-width: 251px; -} -td > .filesize > img[md5] { max-height: 126px; max-width: 126px; } +.filesize:first-child ~ a > img[md5] { + max-height: 251px; + max-width: 251px; +} #qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks { position: fixed;