diff --git a/src/Images/RevealSpoilers.coffee b/src/Images/RevealSpoilers.coffee index 94ceb4dc6..e0687ed27 100644 --- a/src/Images/RevealSpoilers.coffee +++ b/src/Images/RevealSpoilers.coffee @@ -9,8 +9,6 @@ RevealSpoilers = node: -> return unless not @isClone and @file and @file.thumb and @file.isSpoiler {thumb} = @file - $.rmClass thumb.parentNode, 'imgspoiler' - $.addClass thumb.parentNode, 'imgspoiler-revealed' # Remove old width and height. thumb.removeAttribute 'style' # Enforce thumbnail size if thumbnail is replaced. diff --git a/src/classes/Post.coffee b/src/classes/Post.coffee index 2d08945f0..80d8956bb 100644 --- a/src/classes/Post.coffee +++ b/src/classes/Post.coffee @@ -176,7 +176,6 @@ class Post size: info[1] isImage: /(jpg|png|gif)$/i.test link.href isVideo: /webm$/i.test link.href - isSpoiler: '.' not in link.textContent dimensions: info[0].match(/\d+x\d+/)?[0] tag: info[0].match(/,[^,]*, ([a-z]+)\)/i)?[1] size = +@file.size.match(/[\d.]+/)[0] @@ -188,6 +187,7 @@ class Post thumb: thumb thumbURL: if m = link.href.match(/\d+(?=\.\w+$)/) then "#{location.protocol}//i.4cdn.org/#{@board}/#{m[0]}s.jpg" MD5: thumb.dataset.md5 + isSpoiler: $.hasClass thumb.parentNode, 'imgspoiler' @deadMark = # \u00A0 is nbsp