fix front page backlink
This commit is contained in:
parent
3ce156a0d0
commit
2f85073d28
21
js/inline.js
21
js/inline.js
@ -11,21 +11,26 @@
|
|||||||
if ($clone.length)
|
if ($clone.length)
|
||||||
return $clone.remove()
|
return $clone.remove()
|
||||||
|
|
||||||
var targetOP = this.pathname.match(/(\d+).html/)[1]
|
var srcOP = $root.closest('[id^=thread]').attr('id').match(/\d+/)[0]
|
||||||
var selector = targetNum === targetOP
|
|
||||||
? '.op .body'
|
|
||||||
: '#reply_' + targetNum
|
|
||||||
|
|
||||||
var node = this.className
|
var node, targetOP
|
||||||
? $root.find('> .intro')
|
if (this.className) {// backlink
|
||||||
: $(this)
|
node = $root.find('> .intro')
|
||||||
|
targetOP = srcOP
|
||||||
|
} else {
|
||||||
|
node = $(this)
|
||||||
|
targetOP = this.pathname.match(/(\d+).html/)[1]
|
||||||
|
}
|
||||||
|
|
||||||
var link = {
|
var link = {
|
||||||
node: node,
|
node: node,
|
||||||
targetNum: targetNum
|
targetNum: targetNum
|
||||||
}
|
}
|
||||||
|
|
||||||
var srcOP = $root.closest('[id^=thread]').attr('id').match(/\d+/)[0]
|
var selector = targetNum === targetOP
|
||||||
|
? '.op .body'
|
||||||
|
: '#reply_' + targetNum
|
||||||
|
|
||||||
if (srcOP === targetOP) {
|
if (srcOP === targetOP) {
|
||||||
// XXX post hover adds fetched threads to the DOM
|
// XXX post hover adds fetched threads to the DOM
|
||||||
selector = '#thread_' + srcOP + ' ' + selector
|
selector = '#thread_' + srcOP + ' ' + selector
|
||||||
|
Loading…
Reference in New Issue
Block a user