Use threads.json instead catalog.json to clear threads.

This commit is contained in:
Nicolas Stepien 2013-03-23 04:19:48 +01:00
parent 3b82f1841e
commit 598d4b1143

View File

@ -2430,10 +2430,10 @@ Misc = # super semantic
return if data.lastChecked > Date.now() - 12 * $.HOUR
$.ajax "//api.4chan.org/#{g.BOARD}/catalog.json", onload: ->
$.ajax "//api.4chan.org/#{g.BOARD}/threads.json", onload: ->
threads = {}
for obj in JSON.parse @response
for thread in obj.threads
for page in JSON.parse @response
for thread in page.threads
if thread.no of data.threads
threads[thread.no] = data.threads[thread.no]
unless Object.keys(threads).length