res -> thread

This commit is contained in:
ccd0 2014-04-12 21:16:01 -07:00
parent ba67c7daea
commit 4ecd6f8cfe
9 changed files with 17 additions and 17 deletions

View File

@ -188,7 +188,7 @@ Build =
pageIcon = ''
if isOP and g.VIEW is 'index'
replyLink = " &nbsp; <span>[<a href='/#{boardID}/res/#{threadID}' class=replylink>Reply</a>]</span>"
replyLink = " &nbsp; <span>[<a href='/#{boardID}/thread/#{threadID}' class=replylink>Reply</a>]</span>"
else
replyLink = ''
@ -200,7 +200,7 @@ Build =
for quote in $$ '.quotelink', container
href = quote.getAttribute 'href'
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
@ -212,7 +212,7 @@ Build =
$.el 'a',
className: 'summary'
textContent: text.join ' '
href: "/#{boardID}/res/#{threadID}"
href: "/#{boardID}/thread/#{threadID}"
thread: (board, data, full) ->
Build.spoilerRange[board] = data.custom_spoiler

View File

@ -18,12 +18,12 @@
</span>#{" "}
<span class=dateTime data-utc=#{dateUTC}>#{date}</span>#{' '}
<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='#{
if g.VIEW is 'thread' and g.THREADID is +threadID then
"javascript:quote(#{postID})"
else
"/#{boardID}/res/#{threadID}#q#{postID}"
"/#{boardID}/thread/#{threadID}#q#{postID}"
}' title='Quote this post'>#{postID}</a>
#{pageIcon + sticky + closed + replyLink}
</span>

View File

@ -52,7 +52,7 @@ ExpandComment =
for quote in $$ '.quotelink', clone
href = quote.getAttribute 'href'
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
$.replace comment, clone
post.nodes.comment = post.nodes.longComment = clone

View File

@ -48,19 +48,19 @@ InfiniScroll =
posts.push op
replylink = $.el 'a',
href: "res/#{threadID}"
href: "thread/#{threadID}"
className: 'replylink'
textContent: 'Reply'
postlink = $.el 'div',
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
posts.push $.el 'span',
className: 'summary desktop'
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',
@ -136,4 +136,4 @@ InfiniScroll =
InfiniScroll.cache = new String @response
InfiniScroll.cache.time = Date.now()
InfiniScroll.parse @response
InfiniScroll.parse @response

View File

@ -218,7 +218,7 @@ Keybinds =
open: (thread, tab) ->
return if g.VIEW isnt 'index'
url = "/#{thread.board}/res/#{thread}"
url = "/#{thread.board}/thread/#{thread}"
if tab
$.open url
else

View File

@ -161,7 +161,7 @@ ThreadWatcher =
if data.isDead
href = Redirect.to 'thread', {boardID, threadID}
link = $.el 'a',
href: href or "/#{boardID}/res/#{threadID}"
href: href or "/#{boardID}/thread/#{threadID}"
textContent: data.excerpt
title: data.excerpt

View File

@ -795,9 +795,9 @@ QR =
QR.cooldown.set {req, post, isReply, threadID}
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
"/#{g.BOARD}/res/#{threadID}#p#{postID}"
"/#{g.BOARD}/thread/#{threadID}#p#{postID}"
if URL
if Conf['Open Post in New Tab']
$.open URL

View File

@ -25,7 +25,7 @@ QuoteBacklink =
firstNode: ->
return if @isClone or !@quotes.length
a = $.el 'a',
href: "/#{@board}/res/#{@thread}#p#{@}"
href: "/#{@board}/thread/#{@thread}#p#{@}"
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 '')
for quote in @quotes

View File

@ -45,13 +45,13 @@ Quotify =
# Don't (Dead) when quotifying in an archived post,
# and we know the post still exists.
a = $.el 'a',
href: "/#{boardID}/res/#{post.thread}#p#{postID}"
href: "/#{boardID}/thread/#{post.thread}#p#{postID}"
className: 'quotelink'
textContent: quote
else
# Replace the .deadlink span if we can redirect.
a = $.el 'a',
href: "/#{boardID}/res/#{post.thread}#p#{postID}"
href: "/#{boardID}/thread/#{post.thread}#p#{postID}"
className: 'quotelink deadlink'
target: '_blank'
textContent: "#{quote}\u00A0(Dead)"