From 1ea6f143840e1796374f51f692cec2f4ef273763 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 24 Jan 2018 12:11:00 -0800 Subject: [PATCH] Fix Thread Watcher links on Tinyboard. --- src/Monitoring/ThreadWatcher.coffee | 2 +- src/site/SW.tinyboard.coffee | 3 +++ src/site/SW.yotsuba.coffee | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 62e99151b..577572c7e 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -304,7 +304,7 @@ ThreadWatcher = excerpt or= "/#{boardID}/ - No.#{threadID}" link = $.el 'a', - href: "/#{boardID}/thread/#{threadID}" + href: "/#{Site.urls.thread({boardID, threadID})}" title: excerpt className: 'watcher-link' diff --git a/src/site/SW.tinyboard.coffee b/src/site/SW.tinyboard.coffee index 5830a4f0c..d42cac420 100644 --- a/src/site/SW.tinyboard.coffee +++ b/src/site/SW.tinyboard.coffee @@ -47,6 +47,9 @@ SW.tinyboard = return true if /\bvar configRoot=".*?"/.test(script.textContent) false + urls: + thread: ({boardID, threadID}) -> "#{boardID}/res/#{threadID}.html" + selectors: board: 'form[name="postcontrols"]' thread: 'div[id^="thread_"]' diff --git a/src/site/SW.yotsuba.coffee b/src/site/SW.yotsuba.coffee index a781b6815..04fedab78 100644 --- a/src/site/SW.yotsuba.coffee +++ b/src/site/SW.yotsuba.coffee @@ -1,6 +1,9 @@ SW.yotsuba = isOPContainerThread: false + urls: + thread: ({boardID, threadID}) -> "#{boardID}/thread/#{threadID}" + selectors: board: '.board' thread: '.thread'