fix Reveal Spoiler Thumbnails on archived posts
This commit is contained in:
parent
1059e300ae
commit
353d46dad9
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user