From bd1dc8cb532587347421679ebda194a4a9981881 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Thu, 8 Aug 2013 14:35:26 -0700 Subject: [PATCH] Fix #298 --- builds/4chan-X.user.js | 6 +++++- builds/crx/script.js | 6 +++++- src/General/Header.coffee | 5 ++++- src/Miscellaneous/CatalogLinks.coffee | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index b797c7a69..758523ea7 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1616,7 +1616,11 @@ a.dataset.only = m[1]; a.href = "//boards.4chan.org/" + board + "/"; if (m[1] === 'catalog') { - a.href += 'catalog'; + if (Conf['External Catalog']) { + a.href = CatalogLinks.external(board); + } else { + a.href += 'catalog'; + } $.addClass(a, 'catalog'); } } diff --git a/builds/crx/script.js b/builds/crx/script.js index fdae8541e..2c5f99ebd 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1628,7 +1628,11 @@ a.dataset.only = m[1]; a.href = "//boards.4chan.org/" + board + "/"; if (m[1] === 'catalog') { - a.href += 'catalog'; + if (Conf['External Catalog']) { + a.href = CatalogLinks.external(board); + } else { + a.href += 'catalog'; + } $.addClass(a, 'catalog'); } } diff --git a/src/General/Header.coffee b/src/General/Header.coffee index c1cea716a..d08b8cd99 100644 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -169,7 +169,10 @@ Header = a.dataset.only = m[1] a.href = "//boards.4chan.org/#{board}/" if m[1] is 'catalog' - a.href += 'catalog' + if Conf['External Catalog'] + a.href = CatalogLinks.external board + else + a.href += 'catalog' $.addClass a, 'catalog' $.addClass a, 'navSmall' if board is '@' diff --git a/src/Miscellaneous/CatalogLinks.coffee b/src/Miscellaneous/CatalogLinks.coffee index b92983ce5..cb1e84535 100644 --- a/src/Miscellaneous/CatalogLinks.coffee +++ b/src/Miscellaneous/CatalogLinks.coffee @@ -35,7 +35,7 @@ CatalogLinks = continue if ['f', 'status', '4chan'].contains(board) or !board if Conf['External Catalog'] a.href = if useCatalog - CatalogLinks.external(board) + CatalogLinks.external board else "//boards.4chan.org/#{board}/" else