Fix QR posts getting swallowed by sys.4chan.org
This commit is contained in:
parent
85c7032d55
commit
f57cfb1fe0
@ -1558,7 +1558,10 @@
|
||||
$('iframe[name=iframe]').src = 'about:blank';
|
||||
fileCount = $('#files', qr.el).childElementCount;
|
||||
tc = data.textContent;
|
||||
if (tc) {
|
||||
if (tc !== "Post successful!") {
|
||||
if (tc === void 0) {
|
||||
data.textContent = "Connection error with sys.4chan.org.";
|
||||
}
|
||||
$.extend($('#error', qr.el), data);
|
||||
$('#recaptcha_response_field', qr.el).value = '';
|
||||
$('#autohide', qr.el).checked = false;
|
||||
@ -1699,10 +1702,8 @@
|
||||
*/
|
||||
$.globalEval(function() {
|
||||
var data, node, _ref;
|
||||
data = {
|
||||
to: 'qr.message'
|
||||
};
|
||||
if (node = (_ref = document.querySelector('table font b')) != null ? _ref.firstChild : void 0) {
|
||||
data = {};
|
||||
if (node = (_ref = document.querySelector('td b')) != null ? _ref.firstChild : void 0) {
|
||||
data.textContent = node.textContent;
|
||||
data.href = node.href;
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ master
|
||||
- mayhem
|
||||
fix time formatting year in Opera
|
||||
fix QR keybinds
|
||||
fix QR posts getting swallowed by sys.4chan.org
|
||||
|
||||
2.21.1
|
||||
- mayhem
|
||||
|
||||
@ -1195,7 +1195,9 @@ qr =
|
||||
fileCount = $('#files', qr.el).childElementCount
|
||||
|
||||
tc = data.textContent
|
||||
if tc # error message
|
||||
if tc isnt "Post successful!" # error message
|
||||
if tc is undefined
|
||||
data.textContent = "Connection error with sys.4chan.org."
|
||||
$.extend $('#error', qr.el), data
|
||||
$('#recaptcha_response_field', qr.el).value = ''
|
||||
$('#autohide', qr.el).checked = false
|
||||
@ -1324,8 +1326,8 @@ qr =
|
||||
in the global context.
|
||||
###
|
||||
$.globalEval ->
|
||||
data = to: 'qr.message'
|
||||
if node = document.querySelector('table font b')?.firstChild
|
||||
data = {}
|
||||
if node = document.querySelector('td b')?.firstChild
|
||||
data.textContent = node.textContent
|
||||
data.href = node.href
|
||||
parent.postMessage data, '*'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user