From 16fc57ca2d824b5abc8d7f64c3567ee7e9184ae5 Mon Sep 17 00:00:00 2001 From: Jordan Bates Date: Fri, 6 Dec 2013 17:02:56 -0700 Subject: [PATCH] Merge mayhems fix for #214 --- builds/4chan-X.user.js | 6 +++--- builds/crx/script.js | 6 +++--- src/Miscellaneous/CatalogLinks.coffee | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 35afb707b..a7f854e6e 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -9491,7 +9491,7 @@ var a, board, path, _i, _len, _ref; path = useCatalog ? 'catalog' : ''; - _ref = $$("#board-list a[href*=\"boards.4chan.org\"]:not(.catalog),\n#boardNavDesktopFoot a[href*=\"boards.4chan.org\"]"); + _ref = $$("#board-list a:not(.catalog),\n#boardNavDesktopFoot a"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { a = _ref[_i]; board = a.pathname.split('/')[1]; @@ -9499,7 +9499,7 @@ continue; } if (Conf['External Catalog']) { - a.href = useCatalog ? CatalogLinks.external(board) : "//boards.4chan.org/" + board + "/"; + a.href = useCatalog ? CatalogLinks.external(board) : "/" + board + "/"; } else { a.pathname = "/" + board + "/" + path; } @@ -9507,7 +9507,7 @@ return this.title = "Turn catalog links " + (useCatalog ? 'off' : 'on') + "."; }, external: function(board) { - return (['a', 'c', 'g', 'co', 'k', 'm', 'o', 'p', 'v', 'vg', 'w', 'cm', '3', 'adv', 'an', 'cgl', 'ck', 'diy', 'fa', 'fit', 'int', 'jp', 'mlp', 'lit', 'mu', 'n', 'po', 'sci', 'toy', 'trv', 'tv', 'vp', 'x', 'q'].contains(board) ? "http://catalog.neet.tv/" + board : ['d', 'e', 'gif', 'h', 'hr', 'hc', 'r9k', 's', 'pol', 'soc', 'u', 'i', 'ic', 'hm', 'r', 'w', 'wg', 'wsg', 't', 'y'].contains(board) ? "http://4index.gropes.us/" + board : "//boards.4chan.org/" + board + "/catalog"); + return (['a', 'c', 'g', 'co', 'k', 'm', 'o', 'p', 'v', 'vg', 'w', 'cm', '3', 'adv', 'an', 'cgl', 'ck', 'diy', 'fa', 'fit', 'int', 'jp', 'mlp', 'lit', 'mu', 'n', 'po', 'sci', 'toy', 'trv', 'tv', 'vp', 'x', 'q'].contains(board) ? "http://catalog.neet.tv/" + board : ['d', 'e', 'gif', 'h', 'hr', 'hc', 'r9k', 's', 'pol', 'soc', 'u', 'i', 'ic', 'hm', 'r', 'w', 'wg', 'wsg', 't', 'y'].contains(board) ? "http://4index.gropes.us/" + board : "/" + board + "/catalog"); } }; diff --git a/builds/crx/script.js b/builds/crx/script.js index 104d8a1b2..54157b6f0 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -9484,7 +9484,7 @@ var a, board, path, _i, _len, _ref; path = useCatalog ? 'catalog' : ''; - _ref = $$("#board-list a[href*=\"boards.4chan.org\"]:not(.catalog),\n#boardNavDesktopFoot a[href*=\"boards.4chan.org\"]"); + _ref = $$("#board-list a:not(.catalog),\n#boardNavDesktopFoot a"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { a = _ref[_i]; board = a.pathname.split('/')[1]; @@ -9492,7 +9492,7 @@ continue; } if (Conf['External Catalog']) { - a.href = useCatalog ? CatalogLinks.external(board) : "//boards.4chan.org/" + board + "/"; + a.href = useCatalog ? CatalogLinks.external(board) : "/" + board + "/"; } else { a.pathname = "/" + board + "/" + path; } @@ -9500,7 +9500,7 @@ return this.title = "Turn catalog links " + (useCatalog ? 'off' : 'on') + "."; }, external: function(board) { - return (['a', 'c', 'g', 'co', 'k', 'm', 'o', 'p', 'v', 'vg', 'w', 'cm', '3', 'adv', 'an', 'cgl', 'ck', 'diy', 'fa', 'fit', 'int', 'jp', 'mlp', 'lit', 'mu', 'n', 'po', 'sci', 'toy', 'trv', 'tv', 'vp', 'x', 'q'].contains(board) ? "http://catalog.neet.tv/" + board : ['d', 'e', 'gif', 'h', 'hr', 'hc', 'r9k', 's', 'pol', 'soc', 'u', 'i', 'ic', 'hm', 'r', 'w', 'wg', 'wsg', 't', 'y'].contains(board) ? "http://4index.gropes.us/" + board : "//boards.4chan.org/" + board + "/catalog"); + return (['a', 'c', 'g', 'co', 'k', 'm', 'o', 'p', 'v', 'vg', 'w', 'cm', '3', 'adv', 'an', 'cgl', 'ck', 'diy', 'fa', 'fit', 'int', 'jp', 'mlp', 'lit', 'mu', 'n', 'po', 'sci', 'toy', 'trv', 'tv', 'vp', 'x', 'q'].contains(board) ? "http://catalog.neet.tv/" + board : ['d', 'e', 'gif', 'h', 'hr', 'hc', 'r9k', 's', 'pol', 'soc', 'u', 'i', 'ic', 'hm', 'r', 'w', 'wg', 'wsg', 't', 'y'].contains(board) ? "http://4index.gropes.us/" + board : "/" + board + "/catalog"); } }; diff --git a/src/Miscellaneous/CatalogLinks.coffee b/src/Miscellaneous/CatalogLinks.coffee index cb1e84535..48a678874 100755 --- a/src/Miscellaneous/CatalogLinks.coffee +++ b/src/Miscellaneous/CatalogLinks.coffee @@ -28,8 +28,8 @@ CatalogLinks = set: (useCatalog) -> path = if useCatalog then 'catalog' else '' for a in $$ """ - #board-list a[href*="boards.4chan.org"]:not(.catalog), - #boardNavDesktopFoot a[href*="boards.4chan.org"] + #board-list a:not(.catalog), + #boardNavDesktopFoot a """ board = a.pathname.split('/')[1] continue if ['f', 'status', '4chan'].contains(board) or !board @@ -37,7 +37,7 @@ CatalogLinks = a.href = if useCatalog CatalogLinks.external board else - "//boards.4chan.org/#{board}/" + "/#{board}/" else a.pathname = "/#{board}/#{path}" @title = "Turn catalog links #{if useCatalog then 'off' else 'on'}." @@ -49,5 +49,5 @@ CatalogLinks = else if ['d', 'e', 'gif', 'h', 'hr', 'hc', 'r9k', 's', 'pol', 'soc', 'u', 'i', 'ic', 'hm', 'r', 'w', 'wg', 'wsg', 't', 'y'].contains board "http://4index.gropes.us/#{board}" else - "//boards.4chan.org/#{board}/catalog" + "/#{board}/catalog" ) \ No newline at end of file