External links
This commit is contained in:
parent
e0bb29e4a4
commit
f1c2ca4691
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -132,7 +132,7 @@ Header =
|
||||
$.rmAll list
|
||||
return unless text
|
||||
as = $$('#full-board-list a', Header.bar)
|
||||
nodes = text.match(/[\w@]+(-(all|title|replace|full|index|catalog|text:"[^"]+"))*|[^\w@]+/g).map (t) ->
|
||||
nodes = text.match(/[\w@]+(-(all|title|replace|full|index|catalog|url:"[^"]+[^"]"|text:"[^"]+"))*|[^\w@]+/g).map (t) ->
|
||||
if /^[^\w@]/.test t
|
||||
return $.tn t
|
||||
if /^toggle-all/.test t
|
||||
@ -142,6 +142,13 @@ Header =
|
||||
href: 'javascript:;'
|
||||
$.on a, 'click', Header.toggleBoardList
|
||||
return a
|
||||
if /^external/.test t
|
||||
a = $.el 'a',
|
||||
href: (t.match(/-url:"(.+)"/) || [null, '+'])[1]
|
||||
textContent: (t.match(/-text:"(.+)"-/) || [null, '+'])[1]
|
||||
className: 'external'
|
||||
target: '_blank'
|
||||
return a
|
||||
board = if /^current/.test t
|
||||
g.BOARD.ID
|
||||
else
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
<div>Custom text link: <code>board-text:"VIP Board"</code></div>
|
||||
<div>Index-only link: <code>board-index</code></div>
|
||||
<div>Catalog-only link: <code>board-catalog</code></div>
|
||||
<div>External link: <code>external-text:"Google"-url:"http://www.google.com"</code></div>
|
||||
<div>Combinations are possible: <code>board-index-text:"VIP Index"</code></div>
|
||||
<div>Full board list toggle: <code>toggle-all</code></div>
|
||||
</fieldset>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user