This commit is contained in:
Nicolas Stepien 2013-01-10 09:39:59 +01:00
parent 82e51f6723
commit b6645773f3
3 changed files with 7 additions and 5 deletions

View File

@ -2596,7 +2596,7 @@
return QR.ajax = $.ajax($.id('postForm').parentNode.action, callbacks, opts);
},
response: function(html) {
var ban, board, doc, err, msg, persona, postID, reply, threadID, _, _ref, _ref1;
var ban, board, doc, err, persona, postID, reply, threadID, _, _ref, _ref1;
doc = d.implementation.createHTMLDocument('');
doc.documentElement.innerHTML = html;
if (ban = $('.banType', doc)) {
@ -2608,7 +2608,7 @@
if ((_ref = $('a', err)) != null) {
_ref.target = '_blank';
}
} else if (!(msg = $('b', doc))) {
} else if (doc.title !== 'Post successful!') {
err = 'Connection error with sys.4chan.org.';
}
if (err) {
@ -2635,7 +2635,7 @@
sub: Conf['Remember Subject'] ? reply.sub : null
};
$.set('QR.persona', persona);
_ref1 = msg.lastChild.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref1[0], threadID = _ref1[1], postID = _ref1[2];
_ref1 = doc.body.lastChild.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref1[0], threadID = _ref1[1], postID = _ref1[2];
$.event(QR.el, new CustomEvent('QRPostSuccessful', {
bubbles: true,
detail: {

View File

@ -1,4 +1,6 @@
master
- Mayhem
Fix successful posting causing errors.
2.37.2
- aeosynth

View File

@ -2060,7 +2060,7 @@ QR =
"Reason: #{$('.reason', doc).innerHTML}"
else if err = doc.getElementById 'errmsg' # error!
$('a', err)?.target = '_blank' # duplicate image link
else unless msg = $ 'b', doc
else if doc.title isnt 'Post successful!'
err = 'Connection error with sys.4chan.org.'
if err
@ -2096,7 +2096,7 @@ QR =
sub: if Conf['Remember Subject'] then reply.sub else null
$.set 'QR.persona', persona
[_, threadID, postID] = msg.lastChild.textContent.match /thread:(\d+),no:(\d+)/
[_, threadID, postID] = doc.body.lastChild.textContent.match /thread:(\d+),no:(\d+)/
# Post/upload confirmed as successful.
$.event QR.el, new CustomEvent 'QRPostSuccessful',