commit
cac27bb944
@ -1,3 +1,4 @@
|
|||||||
|
- Added `Archive link` to the Custom Board Navigation Rice
|
||||||
- Added a setting to configure the number of threads per page for the paged mode of the index.
|
- Added a setting to configure the number of threads per page for the paged mode of the index.
|
||||||
|
|
||||||
### 3.16.4 - *2014-02-04*
|
### 3.16.4 - *2014-02-04*
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
<div><input name="boardnav" class="field" spellcheck="false"></div>
|
<div><input name="boardnav" class="field" spellcheck="false"></div>
|
||||||
<div>In the following, <code>board</code> can translate to a board ID (<code>a</code>, <code>b</code>, etc...), the current board (<code>current</code>), or the Twitter link (<code>@</code>).</div>
|
<div>In the following, <code>board</code> can translate to a board ID (<code>a</code>, <code>b</code>, etc...), the current board (<code>current</code>), or the Twitter link (<code>@</code>).</div>
|
||||||
<div>Board link: <code>board</code></div>
|
<div>Board link: <code>board</code></div>
|
||||||
|
<div>Archive link: <code>board-archive</code></div>
|
||||||
<div>Title link: <code>board-title</code></div>
|
<div>Title link: <code>board-title</code></div>
|
||||||
<div>Board link (Replace with title when on that board): <code>board-replace</code></div>
|
<div>Board link (Replace with title when on that board): <code>board-replace</code></div>
|
||||||
<div>Full text link: <code>board-full</code></div>
|
<div>Full text link: <code>board-full</code></div>
|
||||||
|
|||||||
@ -45,7 +45,7 @@ Redirect =
|
|||||||
cb?()
|
cb?()
|
||||||
|
|
||||||
to: (dest, data) ->
|
to: (dest, data) ->
|
||||||
archive = (if dest is 'search' 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
|
return '' unless archive
|
||||||
Redirect[dest] archive, data
|
Redirect[dest] archive, data
|
||||||
|
|
||||||
@ -80,6 +80,9 @@ Redirect =
|
|||||||
file: (archive, {boardID, filename}) ->
|
file: (archive, {boardID, filename}) ->
|
||||||
"#{Redirect.protocol archive}#{archive.domain}/#{boardID}/full_image/#{filename}"
|
"#{Redirect.protocol archive}#{archive.domain}/#{boardID}/full_image/#{filename}"
|
||||||
|
|
||||||
|
board: (archive, {boardID}) ->
|
||||||
|
"#{Redirect.protocol archive}#{archive.domain}/#{boardID}/"
|
||||||
|
|
||||||
search: (archive, {boardID, type, value}) ->
|
search: (archive, {boardID, type, value}) ->
|
||||||
type = if type is 'name'
|
type = if type is 'name'
|
||||||
'username'
|
'username'
|
||||||
|
|||||||
@ -113,7 +113,7 @@ Header =
|
|||||||
$.rmAll list
|
$.rmAll list
|
||||||
return unless text
|
return unless text
|
||||||
as = $$ '#full-board-list a[title]', Header.bar
|
as = $$ '#full-board-list a[title]', Header.bar
|
||||||
nodes = text.match(/[\w@]+(-(all|title|replace|full|text:"[^"]+"))*|[^\w@]+/g).map (t) ->
|
nodes = text.match(/[\w@]+(-(all|title|replace|full|archive|text:"[^"]+"))*|[^\w@]+/g).map (t) ->
|
||||||
if /^[^\w@]/.test t
|
if /^[^\w@]/.test t
|
||||||
return $.tn t
|
return $.tn t
|
||||||
if /^toggle-all/.test t
|
if /^toggle-all/.test t
|
||||||
@ -140,6 +140,9 @@ Header =
|
|||||||
else
|
else
|
||||||
a.textContent
|
a.textContent
|
||||||
|
|
||||||
|
if /-archive/.test(t) and href = Redirect.to 'board', {boardID: board}
|
||||||
|
a.href = href
|
||||||
|
|
||||||
$.addClass a, 'navSmall' if board is '@'
|
$.addClass a, 'navSmall' if board is '@'
|
||||||
return a
|
return a
|
||||||
$.tn t
|
$.tn t
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user