Fix 4chan board links in header when on other boards.
This commit is contained in:
parent
4acfec4d12
commit
c1d8b08746
@ -232,7 +232,7 @@ Header =
|
|||||||
boardID = g.BOARD.ID
|
boardID = g.BOARD.ID
|
||||||
else
|
else
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
href: "/#{g.BOARD.ID}/"
|
href: "//boards.4chan.org/#{g.BOARD.ID}/"
|
||||||
textContent: text or g.BOARD.ID
|
textContent: text or g.BOARD.ID
|
||||||
className: 'current'
|
className: 'current'
|
||||||
if /-(catalog|archive|expired)/.test(t)
|
if /-(catalog|archive|expired)/.test(t)
|
||||||
|
|||||||
@ -68,7 +68,7 @@ CatalogLinks =
|
|||||||
|
|
||||||
# Href is easier than pathname because then we don't have
|
# Href is easier than pathname because then we don't have
|
||||||
# conditions where External Catalog has been disabled between switches.
|
# conditions where External Catalog has been disabled between switches.
|
||||||
a.href = if Conf['Header catalog links'] then CatalogLinks.catalog(board) else "/#{board}/"
|
a.href = if Conf['Header catalog links'] then CatalogLinks.catalog(board) else "//boards.4chan.org/#{board}/"
|
||||||
|
|
||||||
if a.dataset.indexOptions and a.hostname is 'boards.4chan.org' and a.pathname.split('/')[2] is ''
|
if a.dataset.indexOptions and a.hostname is 'boards.4chan.org' and a.pathname.split('/')[2] is ''
|
||||||
a.href += (if a.hash then '/' else '#') + a.dataset.indexOptions
|
a.href += (if a.hash then '/' else '#') + a.dataset.indexOptions
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user