fix Reveal Spoiler Thumbnails on archived posts

This commit is contained in:
ccd0 2014-07-01 00:43:29 -07:00
parent 1059e300ae
commit 353d46dad9
2 changed files with 2 additions and 4 deletions

View File

@ -217,6 +217,7 @@ Get =
thread = g.threads["#{boardID}.#{threadID}"] or
new Thread threadID, board
post = new Post Build.post(o), thread, board, {isArchived: true}
post.file.thumbURL = o.file.turl
post.isFetchedQuote = true
Main.callbackNodes Post, [post]
Get.insert post, root, context

View File

@ -149,10 +149,7 @@ class Post
unit = ['B', 'KB', 'MB', 'GB'].indexOf @file.size.match(/\w+$/)[0]
size *= 1024 while unit-- > 0
@file.sizeInBytes = size
@file.thumbURL = if that.isArchived
thumb.src
else
"#{location.protocol}//t.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg"
@file.thumbURL = "#{location.protocol}//t.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg"
@file.isImage = /(jpg|png|gif)$/i.test @file.URL
@file.isVideo = /webm$/i.test @file.URL
nameNode = $ 'a', fileText