diff --git a/4chan_x.user.js b/4chan_x.user.js index 6f7528878..2e2ca9106 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2836,9 +2836,7 @@ }, node: function(post) { var img; - img = { - post: post - }; + img = post.img; if (!(img && /^Spoil/.test(img.alt)) || post["class"] === 'inline') return; img.removeAttribute('height'); img.removeAttribute('width'); diff --git a/script.coffee b/script.coffee index 787810371..1d7f31290 100644 --- a/script.coffee +++ b/script.coffee @@ -61,7 +61,7 @@ config = uniqueid: [ '# Filter a specific ID:' '#/Txhvk1Tl/' - ].join '\n' + ].join '\n' tripcode: [ '# Filter any tripfags' '#/^!/' @@ -2338,7 +2338,7 @@ revealSpoilers = init: -> g.callbacks.push @node node: (post) -> - img = {post} + {img} = post if not (img and /^Spoil/.test img.alt) or post.class is 'inline' return img.removeAttribute 'height'