From 2c2dfa34b9b6fc63d183685dab875a5098d9f526 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 13 Dec 2019 11:27:08 -0800 Subject: [PATCH] Don't prune data for threads on kissu.moe while they're in the archive, take 2, using archive.json. --- src/classes/DataBoard.coffee | 2 +- src/site/SW.tinyboard.coffee | 3 +++ src/site/SW.yotsuba.coffee | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/classes/DataBoard.coffee b/src/classes/DataBoard.coffee index 2e76d1413..3cecd069c 100644 --- a/src/classes/DataBoard.coffee +++ b/src/classes/DataBoard.coffee @@ -141,7 +141,7 @@ class DataBoard return that.ajaxCleanParse(boardID, @response) unless archiveList response1 = @response $.cache archiveList, -> - return unless @status is 200 + return unless @status is 200 or (!g.SITE.archivedBoardsKnown and @status is 404) that.ajaxCleanParse(boardID, response1, @response) ajaxCleanParse: (boardID, response1, response2) -> diff --git a/src/site/SW.tinyboard.coffee b/src/site/SW.tinyboard.coffee index 506295992..f2e92a60b 100644 --- a/src/site/SW.tinyboard.coffee +++ b/src/site/SW.tinyboard.coffee @@ -54,6 +54,9 @@ SW.tinyboard = threadsListJSON: ({siteID, boardID}) -> root = Conf['siteProperties'][siteID]?.root if root then "#{root}#{boardID}/threads.json" else '' + archiveListJSON: ({siteID, boardID}) -> + root = Conf['siteProperties'][siteID]?.root + if root then "#{root}#{boardID}/archive/archive.json" else '' catalogJSON: ({siteID, boardID}) -> root = Conf['siteProperties'][siteID]?.root if root then "#{root}#{boardID}/catalog.json" else '' diff --git a/src/site/SW.yotsuba.coffee b/src/site/SW.yotsuba.coffee index c357e0b29..a6939b4c1 100644 --- a/src/site/SW.yotsuba.coffee +++ b/src/site/SW.yotsuba.coffee @@ -1,6 +1,7 @@ SW.yotsuba = isOPContainerThread: false hasIPCount: true + archivedBoardsKnown: true urls: thread: ({boardID, threadID}) -> "#{location.protocol}//#{BoardConfig.domain(boardID)}/#{boardID}/thread/#{threadID}"