Don't use title attribute to select elements. #220
Hopefully this will reduce extension conflicts and sensitivity to 4chan changes.
This commit is contained in:
parent
195fb0655e
commit
4015395c10
@ -12,7 +12,7 @@ Get =
|
||||
threadFromNode: (node) ->
|
||||
Get.threadFromRoot $.x 'ancestor::div[@class="thread"]', node
|
||||
postFromRoot: (root) ->
|
||||
link = $ 'a[title*="Link to this post"]', root
|
||||
link = $ '.postNum > a[href*="#"]', root
|
||||
boardID = link.pathname.split('/')[1]
|
||||
postID = link.hash[2..]
|
||||
index = root.dataset.clone
|
||||
|
||||
@ -16,7 +16,7 @@ class Clone extends Post
|
||||
post: post
|
||||
info: info
|
||||
nameBlock: $ '.nameBlock', info
|
||||
quote: $ 'a[title*="Reply to this post"]', info
|
||||
quote: $ '.postNum > a:nth-of-type(2)', info
|
||||
comment: $ '.postMessage', post
|
||||
quotelinks: []
|
||||
backlinks: info.getElementsByClassName 'backlink'
|
||||
|
||||
@ -21,7 +21,7 @@ class Post
|
||||
el.removeAttribute 'style'
|
||||
# XXX /pol/ fakedoubles
|
||||
if board.ID is 'pol'
|
||||
$('a[title="Reply to this post"]', root2).textContent = +root2.id[2..]
|
||||
$('.postNum > a:nth-of-type(2)', root2).textContent = +root2.id[2..]
|
||||
textNodes = $.X './/text()', root2
|
||||
i = 0
|
||||
while node = textNodes.snapshotItem i++
|
||||
@ -41,7 +41,7 @@ class Post
|
||||
post: post
|
||||
info: info
|
||||
nameBlock: $ '.nameBlock', info
|
||||
quote: $ 'a[title*="Reply to this post"]', info
|
||||
quote: $ '.postNum > a:nth-of-type(2)', info
|
||||
comment: $ '.postMessage', post
|
||||
links: []
|
||||
quotelinks: []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user