Make MD5 work in archive search on /f/. #800

This commit is contained in:
ccd0 2016-04-28 04:41:38 -07:00
parent fcbfd13afd
commit 3c0dd4633b
2 changed files with 8 additions and 1 deletions

View File

@ -190,7 +190,7 @@ Filter =
el: el
open: (post) ->
value = Filter[type] post
value?
value? and not (g.BOARD.ID is 'f' and type is 'MD5')
}
makeFilter: ->

View File

@ -291,6 +291,13 @@ Main =
threads[0].fileLimit = /\bimagelimit *= *1\b/.test scriptData
threads[0].ipCount = if m = scriptData.match /\bunique_ips *= *(\d+)\b/ then +m[1]
if g.BOARD.ID is 'f' and g.VIEW is 'thread'
$.ajax "//a.4cdn.org/f/thread/#{g.THREADID}.json",
timeout: $.MINUTE
onloadend: ->
if @response and posts[0].file
posts[0].file.text.dataset.md5 = posts[0].file.MD5 = @response.posts[0].md5
Main.callbackNodes 'Thread', threads
Main.callbackNodesDB 'Post', posts, ->
QuoteThreading.insert post for post in posts