Fix filter highlight styling.

This commit is contained in:
Nicolas Stepien 2012-04-30 10:28:44 +02:00
parent e52ee68c97
commit 18c9642b52
2 changed files with 8 additions and 15 deletions

View File

@ -621,7 +621,7 @@
if (post.isInlined) {
return;
}
isOP = post["class"] === 'op';
isOP = /\bop\b/.test(post["class"]);
el = post.el;
for (key in Filter.filters) {
value = Filter[key](post);
@ -646,11 +646,7 @@
}
return;
}
if (isOP) {
$.addClass(el.parentNode, result[0]);
} else {
$.addClass(el, result[0]);
}
$.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"]')) {
@ -4574,8 +4570,8 @@ input ~ a > img[data-md5] {\
.filetitle, .replytitle, .postername, .commentpostername, .postertrip {\
background: none;\
}\
.filter_highlight.op,\
.filter_highlight > td[id] {\
.filter_highlight.thread,\
.filter_highlight > .reply {\
box-shadow: -5px 0 rgba(255,0,0,0.5);\
}\
.filtered {\

View File

@ -513,7 +513,7 @@ Filter =
node: (post) ->
return if post.isInlined
isOP = post.class is 'op'
isOP = /\bop\b/.test post.class
{el} = post
for key of Filter.filters
value = Filter[key] post
@ -536,10 +536,7 @@ Filter =
return
# Highlight
if isOP
$.addClass el.parentNode, result[0]
else
$.addClass el, result[0]
$.addClass (if isOP then post.root.parentNode else post.root), result[0]
if isOP and result[1] and not g.REPLY
# Put the highlighted OPs' threads on top of the board pages...
thisThread = el.parentNode.parentNode
@ -3595,8 +3592,8 @@ input ~ a > img[data-md5] {
.filetitle, .replytitle, .postername, .commentpostername, .postertrip {
background: none;
}
.filter_highlight.op,
.filter_highlight > td[id] {
.filter_highlight.thread,
.filter_highlight > .reply {
box-shadow: -5px 0 rgba(255,0,0,0.5);
}
.filtered {