Fix unwanted image hover when thumbnail expanded with old Tinyboard code.

This commit is contained in:
ccd0 2017-12-26 16:08:59 -08:00
parent 84f8ebcbea
commit 8afa261b77
2 changed files with 5 additions and 1 deletions

View File

@ -23,7 +23,7 @@ ImageHover =
return unless doc.contains @
{file} = post
{isVideo} = file
return if file.isExpanding or file.isExpanded
return if file.isExpanding or file.isExpanded or Site.isThumbExpanded?(file)
error = ImageHover.error post
if ImageCommon.cache?.dataset.fullID is post.fullID
el = ImageCommon.popCache()

View File

@ -117,3 +117,7 @@ SW.tinyboard =
thumbURL: if '/static/' in thumb.src then link.href else thumb.src
isSpoiler: !!info[1]
true
isThumbExpanded: (file) ->
# Detect old Tinyboard image expansion that changes src attribute on thumbnail.
$.hasClass file.thumb.parentNode, 'expanded'