Node preparsing related fixes in quote previewing.
This commit is contained in:
parent
e394344f3e
commit
1ff37471ee
@ -3296,7 +3296,7 @@
|
|||||||
return $.off(this, 'click', quotePreview.mouseout);
|
return $.off(this, 'click', quotePreview.mouseout);
|
||||||
},
|
},
|
||||||
parse: function(req, id, threadID) {
|
parse: function(req, id, threadID) {
|
||||||
var body, html, op, qp, reply, _i, _len, _ref;
|
var body, html, op, post, qp, reply, _i, _len, _ref;
|
||||||
if (!((qp = ui.el) && (qp.innerHTML === ("Loading " + id + "...")))) return;
|
if (!((qp = ui.el) && (qp.innerHTML === ("Loading " + id + "...")))) return;
|
||||||
if (req.status !== 200) {
|
if (req.status !== 200) {
|
||||||
qp.textContent = "" + req.status + " " + req.statusText;
|
qp.textContent = "" + req.status + " " + req.statusText;
|
||||||
@ -3319,9 +3319,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
qp.innerHTML = html;
|
qp.innerHTML = html;
|
||||||
if (conf['Image Auto-Gif']) imgGif.node(qp);
|
post = {
|
||||||
if (conf['Time Formatting']) Time.node(qp);
|
root: qp,
|
||||||
if (conf['File Info Formatting']) return FileInfo.node(qp);
|
filesize: $('.filesize', qp),
|
||||||
|
img: $('img[md5]', qp)
|
||||||
|
};
|
||||||
|
if (conf['Image Auto-Gif']) imgGif.node(post);
|
||||||
|
if (conf['Time Formatting']) Time.node(post);
|
||||||
|
if (conf['File Info Formatting']) return FileInfo.node(post);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -653,11 +653,11 @@ expandComment =
|
|||||||
if conf['Quote Preview']
|
if conf['Quote Preview']
|
||||||
quotePreview.node post
|
quotePreview.node post
|
||||||
if conf['Quote Inline']
|
if conf['Quote Inline']
|
||||||
quoteInline.node post
|
quoteInline.node post
|
||||||
if conf['Indicate OP quote']
|
if conf['Indicate OP quote']
|
||||||
quoteOP.node post
|
quoteOP.node post
|
||||||
if conf['Indicate Cross-thread Quotes']
|
if conf['Indicate Cross-thread Quotes']
|
||||||
quoteCT.node post
|
quoteCT.node post
|
||||||
|
|
||||||
expandThread =
|
expandThread =
|
||||||
init: ->
|
init: ->
|
||||||
@ -2692,12 +2692,16 @@ quotePreview =
|
|||||||
html = reply.innerHTML
|
html = reply.innerHTML
|
||||||
break
|
break
|
||||||
qp.innerHTML = html
|
qp.innerHTML = html
|
||||||
|
post =
|
||||||
|
root: qp
|
||||||
|
filesize: $ '.filesize', qp
|
||||||
|
img: $ 'img[md5]', qp
|
||||||
if conf['Image Auto-Gif']
|
if conf['Image Auto-Gif']
|
||||||
imgGif.node qp
|
imgGif.node post
|
||||||
if conf['Time Formatting']
|
if conf['Time Formatting']
|
||||||
Time.node qp
|
Time.node post
|
||||||
if conf['File Info Formatting']
|
if conf['File Info Formatting']
|
||||||
FileInfo.node qp
|
FileInfo.node post
|
||||||
|
|
||||||
quoteOP =
|
quoteOP =
|
||||||
init: ->
|
init: ->
|
||||||
@ -3242,10 +3246,10 @@ Main =
|
|||||||
threadId: g.THREAD_ID or $.x('ancestor::div[contains(@class,"thread")]', node).firstChild.id
|
threadId: g.THREAD_ID or $.x('ancestor::div[contains(@class,"thread")]', node).firstChild.id
|
||||||
isOP: klass is 'op'
|
isOP: klass is 'op'
|
||||||
isInlined: /\binline\b/.test klass
|
isInlined: /\binline\b/.test klass
|
||||||
filesize: $ '.filesize', node
|
filesize: $ '.filesize', node
|
||||||
img: $ 'img[md5]', node
|
img: $ 'img[md5]', node
|
||||||
quotes: $$ '.quotelink', node
|
quotes: $$ '.quotelink', node
|
||||||
backlinks: $$ '.backlink', node
|
backlinks: $$ '.backlink', node
|
||||||
for callback in g.callbacks
|
for callback in g.callbacks
|
||||||
try
|
try
|
||||||
callback post for post in posts
|
callback post for post in posts
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user