Make -nt work for current links on Tinyboard and for external links. #2403

This commit is contained in:
ccd0 2019-08-26 19:21:55 -07:00
parent 831ce556f2
commit 67a8c6fa1f

View File

@ -225,6 +225,9 @@ Header =
href: url or 'javascript:;'
textContent: text or '+'
className: 'external'
if /-nt/.test t
a.target = '_blank'
a.rel = 'noopener';
return a
boardID = t.split('-')[0]
@ -236,6 +239,9 @@ Header =
href: "/#{g.BOARD.ID}/"
textContent: text or g.BOARD.ID
className: 'current'
if /-nt/.test t
a.target = '_blank'
a.rel = 'noopener';
if /-index/.test(t)
a.dataset.only = 'index'
else if /-catalog/.test(t)