parse data, handle mistyped captcha
This commit is contained in:
parent
32ea0a2cb5
commit
e7c77f7cb5
@ -1404,11 +1404,14 @@
|
|||||||
var data, tc, _ref;
|
var data, tc, _ref;
|
||||||
data = e.data;
|
data = e.data;
|
||||||
if (data) {
|
if (data) {
|
||||||
$.extend($('a.error', QR.el), JSON.parse(data));
|
data = JSON.parse(data);
|
||||||
|
$.extend($('a.error', QR.el), data);
|
||||||
tc = data.textContent;
|
tc = data.textContent;
|
||||||
if (tc === 'Error: Duplicate file entry detected.') {
|
if (tc === 'Error: Duplicate file entry detected.') {
|
||||||
QR.attachNext();
|
QR.attachNext();
|
||||||
QR.submit();
|
QR.submit();
|
||||||
|
} else if (tc === 'You seem to have mistyped the verification.') {
|
||||||
|
QR.submit();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1098,11 +1098,14 @@ QR =
|
|||||||
receive: (e) ->
|
receive: (e) ->
|
||||||
{data} = e
|
{data} = e
|
||||||
if data
|
if data
|
||||||
$.extend $('a.error', QR.el), JSON.parse data
|
data = JSON.parse data
|
||||||
|
$.extend $('a.error', QR.el), data
|
||||||
tc = data.textContent
|
tc = data.textContent
|
||||||
if tc is 'Error: Duplicate file entry detected.'
|
if tc is 'Error: Duplicate file entry detected.'
|
||||||
QR.attachNext()
|
QR.attachNext()
|
||||||
QR.submit()
|
QR.submit()
|
||||||
|
else if tc is 'You seem to have mistyped the verification.'
|
||||||
|
QR.submit()
|
||||||
return
|
return
|
||||||
if conf['Persistent QR'] or $('#files input', QR.el)?.files.length
|
if conf['Persistent QR'] or $('#files input', QR.el)?.files.length
|
||||||
QR.reset()
|
QR.reset()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user