post-hider.js: further code cleanup; fix displaying on board pages
This commit is contained in:
parent
0cae0d70b8
commit
d134d2ae22
@ -30,8 +30,7 @@ function phPostHandle(element) {
|
|||||||
else { element.removeClass("thread-hidden"); pomitted.show(); preplies.show(); pbody.show(); pimage.show(); pbutton.text("[–]"); }
|
else { element.removeClass("thread-hidden"); pomitted.show(); preplies.show(); pbody.show(); pimage.show(); pbutton.text("[–]"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function(){
|
function phHandleThread(index, element) {
|
||||||
$('form[name="postcontrols"] > div[id^="thread"]').each(function(index, element){
|
|
||||||
// Get thread ID.
|
// Get thread ID.
|
||||||
var pin = $(this).children("div.post.op").children("p.intro");
|
var pin = $(this).children("div.post.op").children("p.intro");
|
||||||
var tid = phGetOpID($(this));
|
var tid = phGetOpID($(this));
|
||||||
@ -45,5 +44,10 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
phPostHandle($(this));
|
phPostHandle($(this));
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
if (active_page != "thread") {
|
||||||
|
$('form[name="postcontrols"] > div[id^="thread"]').each(phHandleThread);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user