Archive link.
Conflicts: html/General/Settings-section-Rice.html src/General/Header.coffee
This commit is contained in:
parent
2646e3d4f8
commit
9e1f0a12c0
@ -27,7 +27,7 @@ Redirect =
|
|||||||
archives: `<%= JSON.stringify(grunt.file.readJSON('src/Archive/archives.json')) %>`
|
archives: `<%= JSON.stringify(grunt.file.readJSON('src/Archive/archives.json')) %>`
|
||||||
|
|
||||||
to: (dest, data) ->
|
to: (dest, data) ->
|
||||||
archive = (if dest is 'search' then Redirect.data.thread else Redirect.data[dest])[data.boardID]
|
archive = (if dest is 'search' or '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
|
||||||
|
|
||||||
@ -64,6 +64,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'
|
||||||
|
|||||||
@ -170,7 +170,7 @@ Header =
|
|||||||
$.rmAll list
|
$.rmAll list
|
||||||
return unless text
|
return unless text
|
||||||
as = $$ '#full-board-list a[title]', Header.boardList
|
as = $$ '#full-board-list a[title]', Header.boardList
|
||||||
nodes = text.match(/[\w@]+((-(all|title|replace|full|index|catalog|url:"[^"]+[^"]"|text:"[^"]+")|\,"[^"]+[^"]"))*|[^\w@]+/g).map (t) ->
|
nodes = text.match(/[\w@]+((-(all|title|replace|full|index|catalog|archive|url:"[^"]+[^"]"|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
|
||||||
@ -208,6 +208,10 @@ Header =
|
|||||||
a.href = CatalogLinks[m[1]] board
|
a.href = CatalogLinks[m[1]] board
|
||||||
$.addClass a, 'catalog' if m[1] is 'catalog'
|
$.addClass a, 'catalog' if m[1] is 'catalog'
|
||||||
|
|
||||||
|
if /-archive/.test t
|
||||||
|
a.href = Redirect.to 'board',
|
||||||
|
boardID: board
|
||||||
|
|
||||||
$.addClass a, 'navSmall' if board is '@'
|
$.addClass a, 'navSmall' if board is '@'
|
||||||
return a
|
return a
|
||||||
$.tn t
|
$.tn t
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
<span class=note>New lines will be converted into spaces.</span><br><br>
|
<span class=note>New lines will be converted into spaces.</span><br><br>
|
||||||
<div class=note>In the following examples for /g/, <code>g</code> can be changed to a different board ID (<code>a</code>, <code>b</code>, etc...), the current board (<code>current</code>), or the Twitter link (<code>@</code>).</div>
|
<div class=note>In the following examples for /g/, <code>g</code> can be changed to a different 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>g</code></div>
|
<div>Board link: <code>g</code></div>
|
||||||
|
<div>Archive link: <code>g-archive</code></div>
|
||||||
<div>Title link: <code>g-title</code></div>
|
<div>Title link: <code>g-title</code></div>
|
||||||
<div>Board link (Replace with title when on that board): <code>g-replace</code></div>
|
<div>Board link (Replace with title when on that board): <code>g-replace</code></div>
|
||||||
<div>Full text link: <code>g-full</code></div>
|
<div>Full text link: <code>g-full</code></div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user