Add link from native catalog to 4chan X catalog. #247

This commit is contained in:
ccd0 2014-12-28 11:26:22 -08:00
parent b817c43d55
commit 171a82f143

View File

@ -10,6 +10,11 @@ CatalogLinks =
switch link.pathname
when "/#{g.BOARD}/" then link.href = CatalogLinks.index()
when "/#{g.BOARD}/catalog" then link.href = CatalogLinks.catalog()
if g.VIEW is 'catalog' and Conf['JSON Navigation'] and Conf['Use 4chan X Catalog']
catalogLink = link.parentNode.cloneNode true
catalogLink.firstElementChild.textContent = '4chan X Catalog'
catalogLink.firstElementChild.href = CatalogLinks.catalog()
$.after link.parentNode, [$.tn(' '), catalogLink]
return
return unless Conf['Catalog Links']