Further archive link work.

Conflicts:
	src/General/Header.coffee
This commit is contained in:
milky 2014-02-06 05:47:19 +11:00 committed by ccd0
parent 9e1f0a12c0
commit 9daf6dd05f
2 changed files with 3 additions and 4 deletions

View File

@ -27,7 +27,7 @@ Redirect =
archives: `<%= JSON.stringify(grunt.file.readJSON('src/Archive/archives.json')) %>`
to: (dest, data) ->
archive = (if dest is 'search' or 'board' then Redirect.data.thread else Redirect.data[dest])[data.boardID]
archive = (if dest in ['search', 'board'] then Redirect.data.thread else Redirect.data[dest])[data.boardID]
return '' unless archive
Redirect[dest] archive, data

View File

@ -208,9 +208,8 @@ Header =
a.href = CatalogLinks[m[1]] board
$.addClass a, 'catalog' if m[1] is 'catalog'
if /-archive/.test t
a.href = Redirect.to 'board',
boardID: board
if /-archive/.test(t) and href = Redirect.to 'board', {boardID: board}
a.href = href
$.addClass a, 'navSmall' if board is '@'
return a