Filter fixes.

This commit is contained in:
Nicolas Stepien 2012-04-30 11:00:52 +02:00
parent 18c9642b52
commit 59c879b59c
2 changed files with 6 additions and 6 deletions

View File

@ -649,7 +649,7 @@
$.addClass((isOP ? post.root.parentNode : post.root), result[0]); $.addClass((isOP ? post.root.parentNode : post.root), result[0]);
if (isOP && result[1] && !g.REPLY) { if (isOP && result[1] && !g.REPLY) {
thisThread = el.parentNode.parentNode; thisThread = el.parentNode.parentNode;
if (firstThread = $('div[class="postContainer opContainer"]')) { if (firstThread = $('div[class=thread]')) {
$.before(firstThread.parentNode, [thisThread, thisThread.nextElementSibling]); $.before(firstThread.parentNode, [thisThread, thisThread.nextElementSibling]);
} }
} }
@ -657,7 +657,7 @@
} }
}, },
name: function(post) { name: function(post) {
return $('.name', post.el).textContent || false; return $('.name', post.el).textContent;
}, },
uniqueid: function(post) { uniqueid: function(post) {
var uid; var uid;
@ -702,7 +702,7 @@
filename: function(post) { filename: function(post) {
var file, fileInfo; var file, fileInfo;
fileInfo = post.fileInfo; fileInfo = post.fileInfo;
if (fileInfo && (file = $('span', fileInfo))) { if (fileInfo && (file = $('.fileText > span', fileInfo))) {
return file.title; return file.title;
} }
return false; return false;

View File

@ -541,11 +541,11 @@ Filter =
# Put the highlighted OPs' threads on top of the board pages... # Put the highlighted OPs' threads on top of the board pages...
thisThread = el.parentNode.parentNode thisThread = el.parentNode.parentNode
# ...before the first non highlighted thread. # ...before the first non highlighted thread.
if firstThread = $ 'div[class="postContainer opContainer"]' if firstThread = $ 'div[class=thread]'
$.before firstThread.parentNode, [thisThread, thisThread.nextElementSibling] $.before firstThread.parentNode, [thisThread, thisThread.nextElementSibling]
name: (post) -> name: (post) ->
$('.name', post.el).textContent or false $('.name', post.el).textContent
uniqueid: (post) -> uniqueid: (post) ->
# NEW HTML ??? # NEW HTML ???
if uid = $ '.posteruid', post.el if uid = $ '.posteruid', post.el
@ -574,7 +574,7 @@ Filter =
text.join '' text.join ''
filename: (post) -> filename: (post) ->
{fileInfo} = post {fileInfo} = post
if fileInfo and file = $ 'span', fileInfo if fileInfo and file = $ '.fileText > span', fileInfo
return file.title return file.title
false false
dimensions: (post) -> dimensions: (post) ->