Fix duplicate file link.
This commit is contained in:
parent
a92f4261a5
commit
f5ebd27b3a
@ -2448,11 +2448,7 @@
|
|||||||
},
|
},
|
||||||
onerror: function() {
|
onerror: function() {
|
||||||
QR.status();
|
QR.status();
|
||||||
return QR.error($.el('a', {
|
return QR.error('Connection error with sys.4chan.org.');
|
||||||
href: '//www.4chan.org/banned',
|
|
||||||
target: '_blank',
|
|
||||||
textContent: 'Connection error, or you are banned.'
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
opts = {
|
opts = {
|
||||||
@ -2473,7 +2469,7 @@
|
|||||||
return QR.ajax = $.ajax($.id('postForm').parentNode.action, callbacks, opts);
|
return QR.ajax = $.ajax($.id('postForm').parentNode.action, callbacks, opts);
|
||||||
},
|
},
|
||||||
response: function(html) {
|
response: function(html) {
|
||||||
var bs, doc, err, msg, persona, postID, reply, threadID, _, _ref;
|
var bs, doc, err, msg, persona, postID, reply, threadID, _, _ref, _ref1;
|
||||||
doc = d.implementation.createHTMLDocument('');
|
doc = d.implementation.createHTMLDocument('');
|
||||||
doc.documentElement.innerHTML = html;
|
doc.documentElement.innerHTML = html;
|
||||||
if (doc.title === '4chan - Banned') {
|
if (doc.title === '4chan - Banned') {
|
||||||
@ -2481,11 +2477,9 @@
|
|||||||
err = $.el('span', {
|
err = $.el('span', {
|
||||||
innerHTML: /^You were issued a warning/.test($('.boxcontent', doc).textContent.trim()) ? "You were issued a warning on " + bs[0].innerHTML + " as " + bs[3].innerHTML + ".<br>Warning reason: " + bs[1].innerHTML : "You are banned! ;_;<br>Please click <a href=//www.4chan.org/banned target=_blank>HERE</a> to see the reason."
|
innerHTML: /^You were issued a warning/.test($('.boxcontent', doc).textContent.trim()) ? "You were issued a warning on " + bs[0].innerHTML + " as " + bs[3].innerHTML + ".<br>Warning reason: " + bs[1].innerHTML : "You are banned! ;_;<br>Please click <a href=//www.4chan.org/banned target=_blank>HERE</a> to see the reason."
|
||||||
});
|
});
|
||||||
} else if (msg = doc.getElementById('errmsg')) {
|
} else if (err = doc.getElementById('errmsg')) {
|
||||||
err = msg.textContent;
|
if ((_ref = $('a', err)) != null) {
|
||||||
if (msg.firstChild.tagName) {
|
_ref.target = '_blank';
|
||||||
err = msg.firstChild;
|
|
||||||
err.target = '_blank';
|
|
||||||
}
|
}
|
||||||
} else if (!(msg = $('b', doc))) {
|
} else if (!(msg = $('b', doc))) {
|
||||||
err = 'Connection error with sys.4chan.org.';
|
err = 'Connection error with sys.4chan.org.';
|
||||||
@ -2509,7 +2503,7 @@
|
|||||||
sub: Conf['Remember Subject'] ? reply.sub : null
|
sub: Conf['Remember Subject'] ? reply.sub : null
|
||||||
};
|
};
|
||||||
$.set('QR.persona', persona);
|
$.set('QR.persona', persona);
|
||||||
_ref = msg.lastChild.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref[0], threadID = _ref[1], postID = _ref[2];
|
_ref1 = msg.lastChild.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref1[0], threadID = _ref1[1], postID = _ref1[2];
|
||||||
$.event(QR.el, new CustomEvent('QRPostSuccessful', {
|
$.event(QR.el, new CustomEvent('QRPostSuccessful', {
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
detail: {
|
detail: {
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
master
|
master
|
||||||
|
- Mayhem
|
||||||
|
Fix duplicate file upload error link.
|
||||||
|
|
||||||
2.34.8
|
2.34.8
|
||||||
- Mayhem
|
- Mayhem
|
||||||
|
|||||||
@ -1910,10 +1910,7 @@ QR =
|
|||||||
# Connection error, or
|
# Connection error, or
|
||||||
# CORS disabled error on www.4chan.org/banned
|
# CORS disabled error on www.4chan.org/banned
|
||||||
QR.status()
|
QR.status()
|
||||||
QR.error $.el 'a',
|
QR.error 'Connection error with sys.4chan.org.'
|
||||||
href: '//www.4chan.org/banned'
|
|
||||||
target: '_blank'
|
|
||||||
textContent: 'Connection error, or you are banned.'
|
|
||||||
opts =
|
opts =
|
||||||
form: $.formData post
|
form: $.formData post
|
||||||
upCallbacks:
|
upCallbacks:
|
||||||
@ -1937,11 +1934,8 @@ QR =
|
|||||||
"You were issued a warning on #{bs[0].innerHTML} as #{bs[3].innerHTML}.<br>Warning reason: #{bs[1].innerHTML}"
|
"You were issued a warning on #{bs[0].innerHTML} as #{bs[3].innerHTML}.<br>Warning reason: #{bs[1].innerHTML}"
|
||||||
else
|
else
|
||||||
"You are banned! ;_;<br>Please click <a href=//www.4chan.org/banned target=_blank>HERE</a> to see the reason."
|
"You are banned! ;_;<br>Please click <a href=//www.4chan.org/banned target=_blank>HERE</a> to see the reason."
|
||||||
else if msg = doc.getElementById 'errmsg' # error!
|
else if err = doc.getElementById 'errmsg' # error!
|
||||||
err = msg.textContent
|
$('a', err)?.target = '_blank' # duplicate image link
|
||||||
if msg.firstChild.tagName # duplicate image link
|
|
||||||
err = msg.firstChild
|
|
||||||
err.target = '_blank'
|
|
||||||
else unless msg = $ 'b', doc
|
else unless msg = $ 'b', doc
|
||||||
err = 'Connection error with sys.4chan.org.'
|
err = 'Connection error with sys.4chan.org.'
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user