summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-04-19 21:23:35 +0200
committerczaks <marcin@6irc.net>2014-04-19 21:23:35 +0200
commitb0ac5b17d4d11fb416d8919de1283b015dec3507 (patch)
tree7cbd8ebe297eb7d708356ae6ae96a27fe49a05e8 /js
parent8fb70d1196e92e9e35aebf5966c50292093e25fa (diff)
fix show-op.js
Diffstat (limited to 'js')
-rw-r--r--js/show-op.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/js/show-op.js b/js/show-op.js
index 4236bf25..7bf511d5 100644
--- a/js/show-op.js
+++ b/js/show-op.js
@@ -18,9 +18,9 @@ $(document).ready(function(){
var OP;
if ($('div.banner').length == 0) {
- OP = $(this).parent().find('div.post.op a.post_no:eq(1)').text();
+ OP = parseInt($(this).parent().find('div.post.op a.post_no:eq(1)').text());
} else {
- OP = $('div.post.op a.post_no:eq(1)').text();
+ OP = parseInt($('div.post.op a.post_no:eq(1)').text());
}
$(this).find('div.body a:not([rel="nofollow"])').each(function() {
@@ -41,7 +41,13 @@ $(document).ready(function(){
// allow to work with auto-reload.js, etc.
$(document).on('new_post', function(e, post) {
- $(post).each(showOPLinks);
+ if ($(post).is('div.post.reply')) {
+ $(post).each(showOPLinks);
+ }
+ else {
+ $(post).find('div.post.reply').each(showOPLinks);
+ }
});
});
+