Revert "Don't prune data for threads on kissu.moe while they're in the archive."
This reverts commit aca7ed0a550ecab4bcc38d13c09b2e5da115155c.
This commit is contained in:
parent
2bc7b175dc
commit
9a67285c76
@ -138,20 +138,11 @@ class DataBoard
|
|||||||
$.cache threadsList, ->
|
$.cache threadsList, ->
|
||||||
return unless @status is 200
|
return unless @status is 200
|
||||||
archiveList = g.SITE.urls.archiveListJSON?({siteID, boardID})
|
archiveList = g.SITE.urls.archiveListJSON?({siteID, boardID})
|
||||||
archiveListHTML = g.SITE.urls.archive?({siteID, boardID})
|
return that.ajaxCleanParse(boardID, @response) unless archiveList
|
||||||
response1 = @response
|
response1 = @response
|
||||||
if archiveList
|
$.cache archiveList, ->
|
||||||
$.cache archiveList, ->
|
return unless @status is 200
|
||||||
return unless @status is 200
|
that.ajaxCleanParse(boardID, response1, @response)
|
||||||
that.ajaxCleanParse(boardID, response1, @response)
|
|
||||||
else if g.SITE.archiveListParse and archiveListHTML
|
|
||||||
$.cache archiveListHTML, ->
|
|
||||||
return unless @status is 200 or @status is 404
|
|
||||||
response2 = if @status is 404 then [] else g.SITE.archiveListParse(@response)
|
|
||||||
that.ajaxCleanParse(boardID, response1, response2)
|
|
||||||
, {responseType: 'document'}
|
|
||||||
else
|
|
||||||
that.ajaxCleanParse(boardID, @response)
|
|
||||||
|
|
||||||
ajaxCleanParse: (boardID, response1, response2) ->
|
ajaxCleanParse: (boardID, response1, response2) ->
|
||||||
siteID = g.SITE.ID
|
siteID = g.SITE.ID
|
||||||
|
|||||||
@ -208,7 +208,7 @@ $.whenModified = (url, bucket, cb, options={}) ->
|
|||||||
do ->
|
do ->
|
||||||
reqs = $.dict()
|
reqs = $.dict()
|
||||||
$.cache = (url, cb, options={}) ->
|
$.cache = (url, cb, options={}) ->
|
||||||
{ajax, responseType} = options
|
{ajax} = options
|
||||||
if (req = reqs[url])
|
if (req = reqs[url])
|
||||||
if req.callbacks
|
if req.callbacks
|
||||||
req.callbacks.push cb
|
req.callbacks.push cb
|
||||||
@ -221,7 +221,7 @@ do ->
|
|||||||
for cb in @callbacks
|
for cb in @callbacks
|
||||||
do (cb) => $.queueTask => cb.call @, {isCached: false}
|
do (cb) => $.queueTask => cb.call @, {isCached: false}
|
||||||
delete @callbacks
|
delete @callbacks
|
||||||
req = (ajax or $.ajax) url, {onloadend, responseType}
|
req = (ajax or $.ajax) url, {onloadend}
|
||||||
req.callbacks = [cb]
|
req.callbacks = [cb]
|
||||||
reqs[url] = req
|
reqs[url] = req
|
||||||
$.cleanCache = (testf) ->
|
$.cleanCache = (testf) ->
|
||||||
|
|||||||
@ -46,7 +46,6 @@ SW.tinyboard =
|
|||||||
post: ({postID}) -> "##{postID}"
|
post: ({postID}) -> "##{postID}"
|
||||||
index: ({siteID, boardID}) -> "#{Conf['siteProperties'][siteID]?.root or "http://#{siteID}/"}#{boardID}/"
|
index: ({siteID, boardID}) -> "#{Conf['siteProperties'][siteID]?.root or "http://#{siteID}/"}#{boardID}/"
|
||||||
catalog: ({siteID, boardID}) -> "#{Conf['siteProperties'][siteID]?.root or "http://#{siteID}/"}#{boardID}/catalog.html"
|
catalog: ({siteID, boardID}) -> "#{Conf['siteProperties'][siteID]?.root or "http://#{siteID}/"}#{boardID}/catalog.html"
|
||||||
archive: ({siteID, boardID}) -> "#{Conf['siteProperties'][siteID]?.root or "http://#{siteID}/"}#{boardID}/archive/"
|
|
||||||
threadJSON: ({siteID, boardID, threadID}, isArchived) ->
|
threadJSON: ({siteID, boardID, threadID}, isArchived) ->
|
||||||
root = Conf['siteProperties'][siteID]?.root
|
root = Conf['siteProperties'][siteID]?.root
|
||||||
if root then "#{root}#{boardID}/#{if isArchived then 'archive/' else ''}res/#{threadID}.json" else ''
|
if root then "#{root}#{boardID}/#{if isArchived then 'archive/' else ''}res/#{threadID}.json" else ''
|
||||||
@ -111,7 +110,6 @@ SW.tinyboard =
|
|||||||
nav:
|
nav:
|
||||||
prev: '.pages > form > [value=Previous]'
|
prev: '.pages > form > [value=Previous]'
|
||||||
next: '.pages > form > [value=Next]'
|
next: '.pages > form > [value=Next]'
|
||||||
archiveThreadID: '#archive-list td:first-of-type'
|
|
||||||
|
|
||||||
classes:
|
classes:
|
||||||
highlight: 'highlighted'
|
highlight: 'highlighted'
|
||||||
@ -211,6 +209,3 @@ SW.tinyboard =
|
|||||||
|
|
||||||
catalogPin: (threadRoot) ->
|
catalogPin: (threadRoot) ->
|
||||||
threadRoot.dataset.sticky = 'true'
|
threadRoot.dataset.sticky = 'true'
|
||||||
|
|
||||||
archiveListParse: (response) ->
|
|
||||||
$$(SW.tinyboard.selectors.archiveThreadID, response).map((x) -> +x.textContent)
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user