Let nodes.uniqueID be the ID part, and nodes.uniqueIDRoot be the whole thing.
This commit is contained in:
parent
65d6de9e49
commit
3921433292
@ -10,7 +10,7 @@ IDColor =
|
|||||||
cb: @node
|
cb: @node
|
||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
return if @isClone or !((uid = @info.uniqueID) and (span = $ 'span.hand', @nodes.uniqueID))
|
return if @isClone or !((uid = @info.uniqueID) and (span = @nodes.uniqueID))
|
||||||
|
|
||||||
rgb = IDColor.ids[uid] or IDColor.compute uid
|
rgb = IDColor.ids[uid] or IDColor.compute uid
|
||||||
|
|
||||||
|
|||||||
@ -9,8 +9,8 @@ IDHighlight =
|
|||||||
uniqueID: null
|
uniqueID: null
|
||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
$.on @nodes.uniqueID, 'click', IDHighlight.click @ if @nodes.uniqueID
|
$.on @nodes.uniqueIDRoot, 'click', IDHighlight.click @ if @nodes.uniqueIDRoot
|
||||||
$.on @nodes.capcode, 'click', IDHighlight.click @ if @nodes.capcode
|
$.on @nodes.capcode, 'click', IDHighlight.click @ if @nodes.capcode
|
||||||
IDHighlight.set @ unless @isClone
|
IDHighlight.set @ unless @isClone
|
||||||
|
|
||||||
set: (post) ->
|
set: (post) ->
|
||||||
|
|||||||
@ -10,7 +10,7 @@ IDPostCount =
|
|||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
if @nodes.uniqueID and @thread is IDPostCount.thread
|
if @nodes.uniqueID and @thread is IDPostCount.thread
|
||||||
$.on $('span.hand', @nodes.uniqueID), 'mouseover', IDPostCount.count
|
$.on @nodes.uniqueID, 'mouseover', IDPostCount.count
|
||||||
|
|
||||||
count: ->
|
count: ->
|
||||||
{uniqueID} = Get.postFromNode(@).info
|
{uniqueID} = Get.postFromNode(@).info
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class Post
|
|||||||
subject: @nodes.subject?.textContent or undefined
|
subject: @nodes.subject?.textContent or undefined
|
||||||
name: @nodes.name?.textContent
|
name: @nodes.name?.textContent
|
||||||
tripcode: @nodes.tripcode?.textContent
|
tripcode: @nodes.tripcode?.textContent
|
||||||
uniqueID: @nodes.uniqueID?.firstElementChild.textContent
|
uniqueID: @nodes.uniqueID?.textContent
|
||||||
capcode: @nodes.capcode?.textContent.replace '## ', ''
|
capcode: @nodes.capcode?.textContent.replace '## ', ''
|
||||||
pass: @nodes.pass?.title.match(/\d*$/)[0]
|
pass: @nodes.pass?.title.match(/\d*$/)[0]
|
||||||
flagCode: @nodes.flag?.className.match(/flag-(\w+)/)?[1].toUpperCase()
|
flagCode: @nodes.flag?.className.match(/flag-(\w+)/)?[1].toUpperCase()
|
||||||
@ -65,25 +65,26 @@ class Post
|
|||||||
post = $ '.post', root
|
post = $ '.post', root
|
||||||
info = $ '.postInfo', post
|
info = $ '.postInfo', post
|
||||||
nodes =
|
nodes =
|
||||||
root: root
|
root: root
|
||||||
post: post
|
post: post
|
||||||
info: info
|
info: info
|
||||||
subject: $ '.subject', info
|
subject: $ '.subject', info
|
||||||
name: $ '.name', info
|
name: $ '.name', info
|
||||||
email: $ '.useremail', info
|
email: $ '.useremail', info
|
||||||
tripcode: $ '.postertrip', info
|
tripcode: $ '.postertrip', info
|
||||||
uniqueID: $ '.posteruid', info
|
uniqueIDRoot: $ '.posteruid', info
|
||||||
capcode: $ '.capcode.hand', info
|
uniqueID: $ '.posteruid > .hand', info
|
||||||
pass: $ '.n-pu', info
|
capcode: $ '.capcode.hand', info
|
||||||
flag: $ '.flag, .countryFlag', info
|
pass: $ '.n-pu', info
|
||||||
date: $ '.dateTime', info
|
flag: $ '.flag, .countryFlag', info
|
||||||
nameBlock: $ '.nameBlock', info
|
date: $ '.dateTime', info
|
||||||
quote: $ '.postNum > a:nth-of-type(2)', info
|
nameBlock: $ '.nameBlock', info
|
||||||
reply: $ '.replylink', info
|
quote: $ '.postNum > a:nth-of-type(2)', info
|
||||||
fileRoot: $ '.file', post
|
reply: $ '.replylink', info
|
||||||
comment: $ '.postMessage', post
|
fileRoot: $ '.file', post
|
||||||
links: []
|
comment: $ '.postMessage', post
|
||||||
quotelinks: []
|
links: []
|
||||||
|
quotelinks: []
|
||||||
archivelinks: []
|
archivelinks: []
|
||||||
|
|
||||||
# XXX Edge invalidates HTMLCollections when an ancestor node is inserted into another node.
|
# XXX Edge invalidates HTMLCollections when an ancestor node is inserted into another node.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user