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