Merge mayhems fix for #214

This commit is contained in:
Jordan Bates 2013-12-06 17:02:56 -07:00
parent 16e2afa916
commit 16fc57ca2d
3 changed files with 10 additions and 10 deletions

View File

@ -9491,7 +9491,7 @@
var a, board, path, _i, _len, _ref; var a, board, path, _i, _len, _ref;
path = useCatalog ? 'catalog' : ''; 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++) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
a = _ref[_i]; a = _ref[_i];
board = a.pathname.split('/')[1]; board = a.pathname.split('/')[1];
@ -9499,7 +9499,7 @@
continue; continue;
} }
if (Conf['External Catalog']) { if (Conf['External Catalog']) {
a.href = useCatalog ? CatalogLinks.external(board) : "//boards.4chan.org/" + board + "/"; a.href = useCatalog ? CatalogLinks.external(board) : "/" + board + "/";
} else { } else {
a.pathname = "/" + board + "/" + path; a.pathname = "/" + board + "/" + path;
} }
@ -9507,7 +9507,7 @@
return this.title = "Turn catalog links " + (useCatalog ? 'off' : 'on') + "."; return this.title = "Turn catalog links " + (useCatalog ? 'off' : 'on') + ".";
}, },
external: function(board) { 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");
} }
}; };

View File

@ -9484,7 +9484,7 @@
var a, board, path, _i, _len, _ref; var a, board, path, _i, _len, _ref;
path = useCatalog ? 'catalog' : ''; 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++) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
a = _ref[_i]; a = _ref[_i];
board = a.pathname.split('/')[1]; board = a.pathname.split('/')[1];
@ -9492,7 +9492,7 @@
continue; continue;
} }
if (Conf['External Catalog']) { if (Conf['External Catalog']) {
a.href = useCatalog ? CatalogLinks.external(board) : "//boards.4chan.org/" + board + "/"; a.href = useCatalog ? CatalogLinks.external(board) : "/" + board + "/";
} else { } else {
a.pathname = "/" + board + "/" + path; a.pathname = "/" + board + "/" + path;
} }
@ -9500,7 +9500,7 @@
return this.title = "Turn catalog links " + (useCatalog ? 'off' : 'on') + "."; return this.title = "Turn catalog links " + (useCatalog ? 'off' : 'on') + ".";
}, },
external: function(board) { 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");
} }
}; };

View File

@ -28,8 +28,8 @@ CatalogLinks =
set: (useCatalog) -> set: (useCatalog) ->
path = if useCatalog then 'catalog' else '' path = if useCatalog then 'catalog' else ''
for a in $$ """ for a in $$ """
#board-list a[href*="boards.4chan.org"]:not(.catalog), #board-list a:not(.catalog),
#boardNavDesktopFoot a[href*="boards.4chan.org"] #boardNavDesktopFoot a
""" """
board = a.pathname.split('/')[1] board = a.pathname.split('/')[1]
continue if ['f', 'status', '4chan'].contains(board) or !board continue if ['f', 'status', '4chan'].contains(board) or !board
@ -37,7 +37,7 @@ CatalogLinks =
a.href = if useCatalog a.href = if useCatalog
CatalogLinks.external board CatalogLinks.external board
else else
"//boards.4chan.org/#{board}/" "/#{board}/"
else else
a.pathname = "/#{board}/#{path}" a.pathname = "/#{board}/#{path}"
@title = "Turn catalog links #{if useCatalog then 'off' else 'on'}." @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 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}" "http://4index.gropes.us/#{board}"
else else
"//boards.4chan.org/#{board}/catalog" "/#{board}/catalog"
) )