Let nodes.uniqueID be the ID part, and nodes.uniqueIDRoot be the whole thing.

This commit is contained in:
ccd0 2016-10-09 14:42:26 -07:00
parent 65d6de9e49
commit 3921433292
4 changed files with 25 additions and 24 deletions

View File

@ -10,7 +10,7 @@ IDColor =
cb: @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

View File

@ -9,8 +9,8 @@ IDHighlight =
uniqueID: null
node: ->
$.on @nodes.uniqueID, 'click', IDHighlight.click @ if @nodes.uniqueID
$.on @nodes.capcode, 'click', IDHighlight.click @ if @nodes.capcode
$.on @nodes.uniqueIDRoot, 'click', IDHighlight.click @ if @nodes.uniqueIDRoot
$.on @nodes.capcode, 'click', IDHighlight.click @ if @nodes.capcode
IDHighlight.set @ unless @isClone
set: (post) ->

View File

@ -10,7 +10,7 @@ IDPostCount =
node: ->
if @nodes.uniqueID and @thread is IDPostCount.thread
$.on $('span.hand', @nodes.uniqueID), 'mouseover', IDPostCount.count
$.on @nodes.uniqueID, 'mouseover', IDPostCount.count
count: ->
{uniqueID} = Get.postFromNode(@).info

View File

@ -27,7 +27,7 @@ class Post
subject: @nodes.subject?.textContent or undefined
name: @nodes.name?.textContent
tripcode: @nodes.tripcode?.textContent
uniqueID: @nodes.uniqueID?.firstElementChild.textContent
uniqueID: @nodes.uniqueID?.textContent
capcode: @nodes.capcode?.textContent.replace '## ', ''
pass: @nodes.pass?.title.match(/\d*$/)[0]
flagCode: @nodes.flag?.className.match(/flag-(\w+)/)?[1].toUpperCase()
@ -65,25 +65,26 @@ class Post
post = $ '.post', root
info = $ '.postInfo', post
nodes =
root: root
post: post
info: info
subject: $ '.subject', info
name: $ '.name', info
email: $ '.useremail', info
tripcode: $ '.postertrip', info
uniqueID: $ '.posteruid', info
capcode: $ '.capcode.hand', info
pass: $ '.n-pu', info
flag: $ '.flag, .countryFlag', info
date: $ '.dateTime', info
nameBlock: $ '.nameBlock', info
quote: $ '.postNum > a:nth-of-type(2)', info
reply: $ '.replylink', info
fileRoot: $ '.file', post
comment: $ '.postMessage', post
links: []
quotelinks: []
root: root
post: post
info: info
subject: $ '.subject', info
name: $ '.name', info
email: $ '.useremail', info
tripcode: $ '.postertrip', info
uniqueIDRoot: $ '.posteruid', info
uniqueID: $ '.posteruid > .hand', info
capcode: $ '.capcode.hand', info
pass: $ '.n-pu', info
flag: $ '.flag, .countryFlag', info
date: $ '.dateTime', info
nameBlock: $ '.nameBlock', info
quote: $ '.postNum > a:nth-of-type(2)', info
reply: $ '.replylink', info
fileRoot: $ '.file', post
comment: $ '.postMessage', post
links: []
quotelinks: []
archivelinks: []
# XXX Edge invalidates HTMLCollections when an ancestor node is inserted into another node.