From 6a9508371e2cf4ffae7e0ec5c196e160e2509b6c Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 21 Jul 2019 21:00:58 -0700 Subject: [PATCH] Use external catalog as fallback when there is no native catalog. --- src/General/Settings/Advanced.html | 2 +- src/Miscellaneous/CatalogLinks.coffee | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/General/Settings/Advanced.html b/src/General/Settings/Advanced.html index 03d81f883..25768954b 100644 --- a/src/General/Settings/Advanced.html +++ b/src/General/Settings/Advanced.html @@ -21,7 +21,7 @@
External Catalog -
External Catalog is disabled.
+
External Catalog is disabled. This will be used only as a fallback.
URLs of external catalog sites, where %board is to be replaced by the board name.
Each URL should be followed by ;boards: and optionally ;exclude: and a list of supported/excluded boards in the format explained in the Filter guide. diff --git a/src/Miscellaneous/CatalogLinks.coffee b/src/Miscellaneous/CatalogLinks.coffee index 7462f2256..27af6d5a6 100644 --- a/src/Miscellaneous/CatalogLinks.coffee +++ b/src/Miscellaneous/CatalogLinks.coffee @@ -108,8 +108,10 @@ CatalogLinks = external else if Index.enabledOn(board) and Conf['Use <%= meta.name %> Catalog'] CatalogLinks.jsonIndex board, '#catalog' + else if (nativeCatalog = Get.url 'catalog', board) + nativeCatalog else - Get.url 'catalog', board + CatalogLinks.external board index: (board=g.BOARD) -> if Index.enabledOn(board)