diff --git a/4chan_x.user.js b/4chan_x.user.js index 580a8c652..11c03e822 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1859,7 +1859,7 @@ init: function() { return g.callbacks.push(function(root) { var board, img, nb, _, _ref; - if (root.className === 'inline' || !(img = $('img[alt^=Spoiler]', root))) { + if (!(img = $('img[alt^=Spoiler]', root) || root.className === 'inline')) { return; } img.removeAttribute('height'); diff --git a/script.coffee b/script.coffee index e5245a5f7..70b84b433 100644 --- a/script.coffee +++ b/script.coffee @@ -1486,7 +1486,7 @@ sauce = revealSpoilers = init: -> g.callbacks.push (root) -> - return if root.className is 'inline' or not img = $ 'img[alt^=Spoiler]', root + return if not img = $('img[alt^=Spoiler]', root) or root.className is 'inline' img.removeAttribute 'height' img.removeAttribute 'width' [_, board, nb] = img.parentNode.href.match /(\w+)\/src\/(\d+)/