diff options
| author | James Campos <james.r.campos@gmail.com> | 2014-10-03 13:32:41 -0700 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-10-07 03:27:35 +0200 |
| commit | 3ce156a0d0a6e451b6ecb048f4b14f8a7db057b2 (patch) | |
| tree | a2aedd9f09bdfd604b391861c5b3d16dbeae354f /js/inline.js | |
| parent | 3c98319e52bb1b902c726a435a3c77c927492925 (diff) | |
rename
Diffstat (limited to 'js/inline.js')
| -rw-r--r-- | js/inline.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/inline.js b/js/inline.js index 622d40b3..fb50684b 100644 --- a/js/inline.js +++ b/js/inline.js @@ -5,16 +5,16 @@ e.preventDefault() var $root = $(this).closest('.post') - var postNum = this.textContent.slice(2) + var targetNum = this.textContent.slice(2) - var $clone = $root.find('#inline_' + postNum) + var $clone = $root.find('#inline_' + targetNum) if ($clone.length) return $clone.remove() - var postOP = this.pathname.match(/(\d+).html/)[1] - var selector = postNum === postOP + var targetOP = this.pathname.match(/(\d+).html/)[1] + var selector = targetNum === targetOP ? '.op .body' - : '#reply_' + postNum + : '#reply_' + targetNum var node = this.className ? $root.find('> .intro') @@ -22,11 +22,11 @@ var link = { node: node, - postNum: postNum + targetNum: targetNum } var srcOP = $root.closest('[id^=thread]').attr('id').match(/\d+/)[0] - if (srcOP === postOP) { + if (srcOP === targetOP) { // XXX post hover adds fetched threads to the DOM selector = '#thread_' + srcOP + ' ' + selector // XXX bypass the `(OP)` text @@ -55,7 +55,7 @@ var $clone = $target.clone(true) $clone.attr({ "class": 'inline post', - id: 'inline_' + link.postNum, + id: 'inline_' + link.targetNum, style: null// XXX remove post hover styling }) $clone.insertAfter(link.node) |
