res -> thread
This commit is contained in:
parent
ba67c7daea
commit
4ecd6f8cfe
@ -188,7 +188,7 @@ Build =
|
|||||||
pageIcon = ''
|
pageIcon = ''
|
||||||
|
|
||||||
if isOP and g.VIEW is 'index'
|
if isOP and g.VIEW is 'index'
|
||||||
replyLink = " <span>[<a href='/#{boardID}/res/#{threadID}' class=replylink>Reply</a>]</span>"
|
replyLink = " <span>[<a href='/#{boardID}/thread/#{threadID}' class=replylink>Reply</a>]</span>"
|
||||||
else
|
else
|
||||||
replyLink = ''
|
replyLink = ''
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ Build =
|
|||||||
for quote in $$ '.quotelink', container
|
for quote in $$ '.quotelink', container
|
||||||
href = quote.getAttribute 'href'
|
href = quote.getAttribute 'href'
|
||||||
continue if href[0] is '/' # Cross-board quote, or board link
|
continue if href[0] is '/' # Cross-board quote, or board link
|
||||||
quote.href = "/#{boardID}/res/#{href}" # Fix pathnames
|
quote.href = "/#{boardID}/thread/#{href}" # Fix pathnames
|
||||||
|
|
||||||
container
|
container
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ Build =
|
|||||||
$.el 'a',
|
$.el 'a',
|
||||||
className: 'summary'
|
className: 'summary'
|
||||||
textContent: text.join ' '
|
textContent: text.join ' '
|
||||||
href: "/#{boardID}/res/#{threadID}"
|
href: "/#{boardID}/thread/#{threadID}"
|
||||||
|
|
||||||
thread: (board, data, full) ->
|
thread: (board, data, full) ->
|
||||||
Build.spoilerRange[board] = data.custom_spoiler
|
Build.spoilerRange[board] = data.custom_spoiler
|
||||||
|
|||||||
@ -18,12 +18,12 @@
|
|||||||
</span>#{" "}
|
</span>#{" "}
|
||||||
<span class=dateTime data-utc=#{dateUTC}>#{date}</span>#{' '}
|
<span class=dateTime data-utc=#{dateUTC}>#{date}</span>#{' '}
|
||||||
<span class='postNum'>
|
<span class='postNum'>
|
||||||
<a href=#{"/#{boardID}/res/#{threadID}#p#{postID}"} title='Highlight this post'>No.</a>
|
<a href=#{"/#{boardID}/thread/#{threadID}#p#{postID}"} title='Highlight this post'>No.</a>
|
||||||
<a href='#{
|
<a href='#{
|
||||||
if g.VIEW is 'thread' and g.THREADID is +threadID then
|
if g.VIEW is 'thread' and g.THREADID is +threadID then
|
||||||
"javascript:quote(#{postID})"
|
"javascript:quote(#{postID})"
|
||||||
else
|
else
|
||||||
"/#{boardID}/res/#{threadID}#q#{postID}"
|
"/#{boardID}/thread/#{threadID}#q#{postID}"
|
||||||
}' title='Quote this post'>#{postID}</a>
|
}' title='Quote this post'>#{postID}</a>
|
||||||
#{pageIcon + sticky + closed + replyLink}
|
#{pageIcon + sticky + closed + replyLink}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -52,7 +52,7 @@ ExpandComment =
|
|||||||
for quote in $$ '.quotelink', clone
|
for quote in $$ '.quotelink', clone
|
||||||
href = quote.getAttribute 'href'
|
href = quote.getAttribute 'href'
|
||||||
continue if href[0] is '/' # Cross-board quote, or board link
|
continue if href[0] is '/' # Cross-board quote, or board link
|
||||||
quote.href = "/#{post.board}/res/#{href}" # Fix pathnames
|
quote.href = "/#{post.board}/thread/#{href}" # Fix pathnames
|
||||||
post.nodes.shortComment = comment
|
post.nodes.shortComment = comment
|
||||||
$.replace comment, clone
|
$.replace comment, clone
|
||||||
post.nodes.comment = post.nodes.longComment = clone
|
post.nodes.comment = post.nodes.longComment = clone
|
||||||
|
|||||||
@ -48,19 +48,19 @@ InfiniScroll =
|
|||||||
posts.push op
|
posts.push op
|
||||||
|
|
||||||
replylink = $.el 'a',
|
replylink = $.el 'a',
|
||||||
href: "res/#{threadID}"
|
href: "thread/#{threadID}"
|
||||||
className: 'replylink'
|
className: 'replylink'
|
||||||
textContent: 'Reply'
|
textContent: 'Reply'
|
||||||
|
|
||||||
postlink = $.el 'div',
|
postlink = $.el 'div',
|
||||||
className: "postLink mobile"
|
className: "postLink mobile"
|
||||||
innerHTML: """<a href="res/#{threadID}" class="button">View Thread</a>"""
|
innerHTML: """<a href="thread/#{threadID}" class="button">View Thread</a>"""
|
||||||
|
|
||||||
if omitted_posts
|
if omitted_posts
|
||||||
posts.push $.el 'span',
|
posts.push $.el 'span',
|
||||||
className: 'summary desktop'
|
className: 'summary desktop'
|
||||||
innerHTML: """
|
innerHTML: """
|
||||||
#{omitted_posts} posts #{if omitted_images then "and " + omitted_images + " image replies"} omitted. Click <a class="replylink" href="res/#{threadID}">here</a> to view.
|
#{omitted_posts} posts #{if omitted_images then "and " + omitted_images + " image replies"} omitted. Click <a class="replylink" href="thread/#{threadID}">here</a> to view.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
$.prepend postlink, $.el 'span',
|
$.prepend postlink, $.el 'span',
|
||||||
@ -136,4 +136,4 @@ InfiniScroll =
|
|||||||
|
|
||||||
InfiniScroll.cache = new String @response
|
InfiniScroll.cache = new String @response
|
||||||
InfiniScroll.cache.time = Date.now()
|
InfiniScroll.cache.time = Date.now()
|
||||||
InfiniScroll.parse @response
|
InfiniScroll.parse @response
|
||||||
|
|||||||
@ -218,7 +218,7 @@ Keybinds =
|
|||||||
|
|
||||||
open: (thread, tab) ->
|
open: (thread, tab) ->
|
||||||
return if g.VIEW isnt 'index'
|
return if g.VIEW isnt 'index'
|
||||||
url = "/#{thread.board}/res/#{thread}"
|
url = "/#{thread.board}/thread/#{thread}"
|
||||||
if tab
|
if tab
|
||||||
$.open url
|
$.open url
|
||||||
else
|
else
|
||||||
|
|||||||
@ -161,7 +161,7 @@ ThreadWatcher =
|
|||||||
if data.isDead
|
if data.isDead
|
||||||
href = Redirect.to 'thread', {boardID, threadID}
|
href = Redirect.to 'thread', {boardID, threadID}
|
||||||
link = $.el 'a',
|
link = $.el 'a',
|
||||||
href: href or "/#{boardID}/res/#{threadID}"
|
href: href or "/#{boardID}/thread/#{threadID}"
|
||||||
textContent: data.excerpt
|
textContent: data.excerpt
|
||||||
title: data.excerpt
|
title: data.excerpt
|
||||||
|
|
||||||
|
|||||||
@ -795,9 +795,9 @@ QR =
|
|||||||
QR.cooldown.set {req, post, isReply, threadID}
|
QR.cooldown.set {req, post, isReply, threadID}
|
||||||
|
|
||||||
URL = if threadID is postID # new thread
|
URL = if threadID is postID # new thread
|
||||||
"/#{g.BOARD}/res/#{threadID}"
|
"/#{g.BOARD}/thread/#{threadID}"
|
||||||
else if g.VIEW is 'index' and !QR.cooldown.auto and Conf['Open Post in New Tab'] # replying from the index
|
else if g.VIEW is 'index' and !QR.cooldown.auto and Conf['Open Post in New Tab'] # replying from the index
|
||||||
"/#{g.BOARD}/res/#{threadID}#p#{postID}"
|
"/#{g.BOARD}/thread/#{threadID}#p#{postID}"
|
||||||
if URL
|
if URL
|
||||||
if Conf['Open Post in New Tab']
|
if Conf['Open Post in New Tab']
|
||||||
$.open URL
|
$.open URL
|
||||||
|
|||||||
@ -25,7 +25,7 @@ QuoteBacklink =
|
|||||||
firstNode: ->
|
firstNode: ->
|
||||||
return if @isClone or !@quotes.length
|
return if @isClone or !@quotes.length
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
href: "/#{@board}/res/#{@thread}#p#{@}"
|
href: "/#{@board}/thread/#{@thread}#p#{@}"
|
||||||
className: if @isHidden then 'filtered backlink' else 'backlink'
|
className: if @isHidden then 'filtered backlink' else 'backlink'
|
||||||
textContent: (QuoteBacklink.funk @ID) + (if Conf['Mark Quotes of You'] and @info.yours then '\u00A0(You)' else '')
|
textContent: (QuoteBacklink.funk @ID) + (if Conf['Mark Quotes of You'] and @info.yours then '\u00A0(You)' else '')
|
||||||
for quote in @quotes
|
for quote in @quotes
|
||||||
|
|||||||
@ -45,13 +45,13 @@ Quotify =
|
|||||||
# Don't (Dead) when quotifying in an archived post,
|
# Don't (Dead) when quotifying in an archived post,
|
||||||
# and we know the post still exists.
|
# and we know the post still exists.
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
href: "/#{boardID}/res/#{post.thread}#p#{postID}"
|
href: "/#{boardID}/thread/#{post.thread}#p#{postID}"
|
||||||
className: 'quotelink'
|
className: 'quotelink'
|
||||||
textContent: quote
|
textContent: quote
|
||||||
else
|
else
|
||||||
# Replace the .deadlink span if we can redirect.
|
# Replace the .deadlink span if we can redirect.
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
href: "/#{boardID}/res/#{post.thread}#p#{postID}"
|
href: "/#{boardID}/thread/#{post.thread}#p#{postID}"
|
||||||
className: 'quotelink deadlink'
|
className: 'quotelink deadlink'
|
||||||
target: '_blank'
|
target: '_blank'
|
||||||
textContent: "#{quote}\u00A0(Dead)"
|
textContent: "#{quote}\u00A0(Dead)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user