Fix Reveal Spoiler. Derp.

This commit is contained in:
Nicolas Stepien 2012-03-03 19:45:37 +01:00
parent bf18a4b06b
commit 0d7530f8d0
2 changed files with 3 additions and 5 deletions

View File

@ -2836,9 +2836,7 @@
}, },
node: function(post) { node: function(post) {
var img; var img;
img = { img = post.img;
post: post
};
if (!(img && /^Spoil/.test(img.alt)) || post["class"] === 'inline') return; if (!(img && /^Spoil/.test(img.alt)) || post["class"] === 'inline') return;
img.removeAttribute('height'); img.removeAttribute('height');
img.removeAttribute('width'); img.removeAttribute('width');

View File

@ -2338,7 +2338,7 @@ revealSpoilers =
init: -> init: ->
g.callbacks.push @node g.callbacks.push @node
node: (post) -> node: (post) ->
img = {post} {img} = post
if not (img and /^Spoil/.test img.alt) or post.class is 'inline' if not (img and /^Spoil/.test img.alt) or post.class is 'inline'
return return
img.removeAttribute 'height' img.removeAttribute 'height'