diff --git a/4chan_x.user.js b/4chan_x.user.js index 5b9b1e16c..07aafcfc2 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -649,7 +649,7 @@ $.addClass((isOP ? post.root.parentNode : post.root), result[0]); if (isOP && result[1] && !g.REPLY) { thisThread = el.parentNode.parentNode; - if (firstThread = $('div[class="postContainer opContainer"]')) { + if (firstThread = $('div[class=thread]')) { $.before(firstThread.parentNode, [thisThread, thisThread.nextElementSibling]); } } @@ -657,7 +657,7 @@ } }, name: function(post) { - return $('.name', post.el).textContent || false; + return $('.name', post.el).textContent; }, uniqueid: function(post) { var uid; @@ -702,7 +702,7 @@ filename: function(post) { var file, fileInfo; fileInfo = post.fileInfo; - if (fileInfo && (file = $('span', fileInfo))) { + if (fileInfo && (file = $('.fileText > span', fileInfo))) { return file.title; } return false; diff --git a/script.coffee b/script.coffee index 57dc06936..b5c1af466 100644 --- a/script.coffee +++ b/script.coffee @@ -541,11 +541,11 @@ Filter = # Put the highlighted OPs' threads on top of the board pages... thisThread = el.parentNode.parentNode # ...before the first non highlighted thread. - if firstThread = $ 'div[class="postContainer opContainer"]' + if firstThread = $ 'div[class=thread]' $.before firstThread.parentNode, [thisThread, thisThread.nextElementSibling] name: (post) -> - $('.name', post.el).textContent or false + $('.name', post.el).textContent uniqueid: (post) -> # NEW HTML ??? if uid = $ '.posteruid', post.el @@ -574,7 +574,7 @@ Filter = text.join '' filename: (post) -> {fileInfo} = post - if fileInfo and file = $ 'span', fileInfo + if fileInfo and file = $ '.fileText > span', fileInfo return file.title false dimensions: (post) ->