Eliminate needless normalize().
This commit is contained in:
parent
d0b492760c
commit
7926894a45
@ -186,9 +186,14 @@ SW.tinyboard =
|
|||||||
parseNodes: (post, nodes) ->
|
parseNodes: (post, nodes) ->
|
||||||
# Add vichan's span.poster_id around the ID if not already present.
|
# Add vichan's span.poster_id around the ID if not already present.
|
||||||
return if nodes.uniqueID
|
return if nodes.uniqueID
|
||||||
nodes.info.normalize()
|
text = ''
|
||||||
{nextSibling} = nodes.nameBlock
|
node = nodes.nameBlock.nextSibling
|
||||||
if nextSibling.nodeType is 3 and (m = nextSibling.textContent.match /(\s*ID:\s*)(\S+)/)
|
while node and node.nodeType is 3
|
||||||
|
text += node.textContent
|
||||||
|
node = node.nextSibling
|
||||||
|
if (m = text.match /(\s*ID:\s*)(\S+)/)
|
||||||
|
nodes.info.normalize()
|
||||||
|
{nextSibling} = nodes.nameBlock
|
||||||
nextSibling = nextSibling.splitText m[1].length
|
nextSibling = nextSibling.splitText m[1].length
|
||||||
nextSibling.splitText m[2].length
|
nextSibling.splitText m[2].length
|
||||||
nodes.uniqueID = uniqueID = $.el 'span', {className: 'poster_id'}
|
nodes.uniqueID = uniqueID = $.el 'span', {className: 'poster_id'}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user