summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJames Campos <james.r.campos@gmail.com>2014-10-03 13:28:52 -0700
committerczaks <marcin@6irc.net>2014-10-07 03:27:35 +0200
commit3c98319e52bb1b902c726a435a3c77c927492925 (patch)
treed6e1350a7a0fbecbdcb10500c8fa304707bcc0fd /js
parent9ea5ff610e38f3c390cb19bec86ee5b1ab57d187 (diff)
front page fixes
Diffstat (limited to 'js')
-rw-r--r--js/inline.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/js/inline.js b/js/inline.js
index 0ea7f233..622d40b3 100644
--- a/js/inline.js
+++ b/js/inline.js
@@ -25,14 +25,16 @@
postNum: postNum
}
- var OP = $('input[name="thread"]').val()
- if (OP === postOP) {
+ var srcOP = $root.closest('[id^=thread]').attr('id').match(/\d+/)[0]
+ if (srcOP === postOP) {
// XXX post hover adds fetched threads to the DOM
- selector = '#thread_' + OP + ' ' + selector
+ selector = '#thread_' + srcOP + ' ' + selector
// XXX bypass the `(OP)` text
link.node = link.node.next()
+
var $target = $(selector)
- return add(link, $target)
+ if ($target.length)
+ return add(link, $target)
}
var url = this.pathname
@@ -53,7 +55,8 @@
var $clone = $target.clone(true)
$clone.attr({
"class": 'inline post',
- id: 'inline_' + link.postNum
+ id: 'inline_' + link.postNum,
+ style: null// XXX remove post hover styling
})
$clone.insertAfter(link.node)
}