apply Mayhem's quoting fix

This commit is contained in:
ccd0 2014-05-03 08:23:02 -07:00
parent f6a5fce277
commit 57f780ebfb
6 changed files with 7 additions and 7 deletions

View File

@ -13,7 +13,7 @@ Get =
threadFromNode: (node) ->
Get.threadFromRoot $.x 'ancestor::div[@class="thread"]', node
postFromRoot: (root) ->
link = $ 'a[title="Highlight this post"]', root
link = $ 'a[title="Link to this post"]', root
boardID = link.pathname.split('/')[1]
postID = link.hash[2..]
index = root.dataset.clone

View File

@ -25,7 +25,7 @@ Navigate =
post: ->
# We don't need to reload the thread inside the thread
return if g.VIEW is 'thread' and @thread.ID is g.THREADID
postlink = $ 'a[title="Highlight this post"]', @nodes.info
postlink = $ 'a[title="Link to this post"]', @nodes.info
$.on postlink, 'click', Navigate.navigate
return unless Conf['Quote Hash Navigation']

View File

@ -18,13 +18,13 @@
</span>#{" "}
<span class=dateTime data-utc=#{dateUTC}>#{date}</span>#{' '}
<span class='postNum'>
<a href=#{"/#{boardID}/thread/#{threadID}#p#{postID}"} title='Highlight this post'>No.</a>
<a href=#{"/#{boardID}/thread/#{threadID}#p#{postID}"} title='Link to this post'>No.</a>
<a href='#{
if g.VIEW is 'thread' and g.THREADID is +threadID then
"javascript:quote(#{postID})"
else
"/#{boardID}/thread/#{threadID}#q#{postID}"
}' title='Quote this post'>#{postID}</a>
}' title='Reply to this post'>#{postID}</a>
#{pageIcon + sticky + closed + replyLink}
</span>
</div>

View File

@ -36,7 +36,7 @@ class Thread
else if g.VIEW is 'index'
$ '.page-num', @OP.nodes.info
else
$ '[title="Quote this post"]', @OP.nodes.info
$ '[title="Reply to this post"]', @OP.nodes.info
$.after root, [$.tn(' '), icon]
kill: ->

View File

@ -112,7 +112,7 @@ Gallery =
target: '_blank'
title: title
thumb.dataset.id = Gallery.images.length
thumb.dataset.post = $('a[title="Highlight this post"]', post.nodes.info).href
thumb.dataset.post = $('a[title="Link to this post"]', post.nodes.info).href
thumbImg = post.file.thumb.cloneNode false
thumbImg.style.cssText = ''

View File

@ -87,7 +87,7 @@ QR =
QR.status()
node: ->
$.on $('a[title="Quote this post"]', @nodes.info), 'click', QR.quote
$.on $('a[title="Reply to this post"]', @nodes.info), 'click', QR.quote
persist: ->
return unless QR.postingIsEnabled