4chan-x/src/Images/RevealSpoilers.coffee
2013-08-12 00:07:39 -07:00

12 lines
323 B
CoffeeScript
Executable File

RevealSpoilers =
init: ->
return if g.VIEW is 'catalog' or !Conf['Reveal Spoiler Thumbnails']
Post::callbacks.push
name: 'Reveal Spoiler Thumbnails'
cb: @node
node: ->
return if @isClone or !@file?.isSpoiler
{thumb} = @file
thumb.removeAttribute 'style'
thumb.src = @file.thumbURL