Make -nt work for current links on Tinyboard and for external links. #2403
This commit is contained in:
parent
831ce556f2
commit
67a8c6fa1f
@ -225,6 +225,9 @@ Header =
|
|||||||
href: url or 'javascript:;'
|
href: url or 'javascript:;'
|
||||||
textContent: text or '+'
|
textContent: text or '+'
|
||||||
className: 'external'
|
className: 'external'
|
||||||
|
if /-nt/.test t
|
||||||
|
a.target = '_blank'
|
||||||
|
a.rel = 'noopener';
|
||||||
return a
|
return a
|
||||||
|
|
||||||
boardID = t.split('-')[0]
|
boardID = t.split('-')[0]
|
||||||
@ -236,6 +239,9 @@ Header =
|
|||||||
href: "/#{g.BOARD.ID}/"
|
href: "/#{g.BOARD.ID}/"
|
||||||
textContent: text or g.BOARD.ID
|
textContent: text or g.BOARD.ID
|
||||||
className: 'current'
|
className: 'current'
|
||||||
|
if /-nt/.test t
|
||||||
|
a.target = '_blank'
|
||||||
|
a.rel = 'noopener';
|
||||||
if /-index/.test(t)
|
if /-index/.test(t)
|
||||||
a.dataset.only = 'index'
|
a.dataset.only = 'index'
|
||||||
else if /-catalog/.test(t)
|
else if /-catalog/.test(t)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user