From 4fcb304b967cc97a62e973bad3e945cf78e3eb22 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 25 Sep 2016 00:03:39 -0700 Subject: [PATCH] Revert "`Reveal Spoiler Thumbnails` will replace the `imgspoiler` class on the thumbnail parent link with `imgspoiler-revealed`." This reverts commit 5fbe0c27d2ab36f433c990f5130f3dd7b9af3307. --- src/Images/RevealSpoilers.coffee | 2 -- src/classes/Post.coffee | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) 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