From 0d7530f8d01702912b69a635459b51444d4b14cd Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 3 Mar 2012 19:45:37 +0100 Subject: [PATCH] Fix Reveal Spoiler. Derp. --- 4chan_x.user.js | 4 +--- script.coffee | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) 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'