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 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

View File

@ -9,7 +9,7 @@ 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

View File

@ -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

View File

@ -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()
@ -72,7 +72,8 @@ class Post
name: $ '.name', info name: $ '.name', info
email: $ '.useremail', info email: $ '.useremail', info
tripcode: $ '.postertrip', info tripcode: $ '.postertrip', info
uniqueID: $ '.posteruid', info uniqueIDRoot: $ '.posteruid', info
uniqueID: $ '.posteruid > .hand', info
capcode: $ '.capcode.hand', info capcode: $ '.capcode.hand', info
pass: $ '.n-pu', info pass: $ '.n-pu', info
flag: $ '.flag, .countryFlag', info flag: $ '.flag, .countryFlag', info