I'm such a baka.

This commit is contained in:
Nicolas Stepien 2013-02-18 01:40:44 +01:00
parent 7e2061cd3d
commit 7c3fd1232c
3 changed files with 13 additions and 11 deletions

View File

@ -4276,7 +4276,7 @@
return post.nodes.comment = post.nodes.shortComment;
},
parse: function(req, a, post) {
var clone, href, postObj, posts, quote, spoilerRange, _i, _j, _len, _len1, _ref;
var clone, comment, href, postObj, posts, quote, spoilerRange, _i, _j, _len, _len1, _ref;
if (req.status !== 200) {
a.textContent = "Error " + req.statusText + " (" + req.status + ")";
return;
@ -4295,7 +4295,8 @@
a.textContent = "Post No." + post + " not found.";
return;
}
clone = post.nodes.comment.cloneNode(false);
comment = post.nodes.comment;
clone = comment.cloneNode(false);
clone.innerHTML = postObj.com;
_ref = $$('.quotelink', clone);
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
@ -4306,6 +4307,9 @@
}
quote.href = "/" + post.board + "/res/" + href;
}
post.nodes.shortComment = comment;
$.replace(comment, clone);
post.nodes.comment = post.nodes.longComment = clone;
post.parseComment();
post.parseQuotes();
if (Conf['Resurrect Quotes']) {
@ -4321,11 +4325,8 @@
QuoteOP.node.call(post);
}
if (Conf['Mark Cross-thread Quotes']) {
QuoteCT.node.call(post);
return QuoteCT.node.call(post);
}
post.nodes.shortComment = post.nodes.comment;
$.replace(post.nodes.comment, clone);
return post.nodes.comment = post.nodes.longComment = clone;
}
};

View File

@ -151,7 +151,7 @@ Config =
# Thread Navigation
'Next thread': ['Down', 'See next thread.']
'Previous thread': ['Up', 'See previous thread.']
'Expand thread': ['Ctrl+e', 'Expand thread.']
'Expand thread': ['Ctrl+e', 'Expand thread.']
'Open thread': ['o', 'Open thread in current tab.']
'Open thread tab': ['Shift+o', 'Open thread in new tab.']
# Reply Navigation

View File

@ -2704,12 +2704,16 @@ ExpandComment =
a.textContent = "Post No.#{post} not found."
return
clone = post.nodes.comment.cloneNode false
{comment} = post.nodes
clone = comment.cloneNode false
clone.innerHTML = postObj.com
for quote in $$ '.quotelink', clone
href = quote.getAttribute 'href'
continue if href[0] is '/' # Cross-board quote, or board link
quote.href = "/#{post.board}/res/#{href}" # Fix pathnames
post.nodes.shortComment = comment
$.replace comment, clone
post.nodes.comment = post.nodes.longComment = clone
post.parseComment()
post.parseQuotes()
if Conf['Resurrect Quotes']
@ -2724,9 +2728,6 @@ ExpandComment =
QuoteCT.node.call post
# XXX g code
# XXX sci math
post.nodes.shortComment = post.nodes.comment
$.replace post.nodes.comment, clone
post.nodes.comment = post.nodes.longComment = clone
ExpandThread =
init: ->