From f30ef0e06845347157849d66596eb931353e21b3 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 24 Nov 2018 23:29:15 -0800 Subject: [PATCH] Make URLs in thread watcher point to appropriate domain. #2143 --- src/Monitoring/ThreadWatcher.coffee | 2 +- src/site/SW.tinyboard.coffee | 2 +- src/site/SW.yotsuba.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 87feb0800..49e007e26 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -305,7 +305,7 @@ ThreadWatcher = excerpt or= "/#{boardID}/ - No.#{threadID}" link = $.el 'a', - href: "/#{Site.urls.thread({boardID, 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 50d84712e..56d8dd381 100644 --- a/src/site/SW.tinyboard.coffee +++ b/src/site/SW.tinyboard.coffee @@ -48,7 +48,7 @@ SW.tinyboard = false urls: - thread: ({boardID, threadID}) -> "#{boardID}/res/#{threadID}.html" + thread: ({boardID, threadID}) -> "#{location.origin}/#{boardID}/res/#{threadID}.html" selectors: board: 'form[name="postcontrols"]' diff --git a/src/site/SW.yotsuba.coffee b/src/site/SW.yotsuba.coffee index e80200011..9936e7bef 100644 --- a/src/site/SW.yotsuba.coffee +++ b/src/site/SW.yotsuba.coffee @@ -2,7 +2,7 @@ SW.yotsuba = isOPContainerThread: false urls: - thread: ({boardID, threadID}) -> "#{boardID}/thread/#{threadID}" + thread: ({boardID, threadID}) -> "#{location.protocol}//#{BoardConfig.domain(boardID)}/#{boardID}/thread/#{threadID}" selectors: board: '.board'