mirror of https://github.com/kurisufriend/Clover
parent
9dbb8e13be
commit
4b63aacf98
@ -1,46 +0,0 @@ |
|||||||
mode=checkcaptcha only works on some boards! |
|
||||||
Until a proper api exists for checking what boards have this option, it will not be implemented. |
|
||||||
(that is, a proper way to check if "var preupload_captcha = true" was set) |
|
||||||
|
|
||||||
|
|
||||||
Send to the normal url "https://sys.4chan.org/" + board + "/post"; |
|
||||||
Used in the extension for checking if the captcha is correct when submitting a large file |
|
||||||
|
|
||||||
POST: |
|
||||||
mode=checkcaptcha |
|
||||||
challenge=<normal captcha challenge> |
|
||||||
response=<user response> |
|
||||||
|
|
||||||
|
|
||||||
returns json: |
|
||||||
{ |
|
||||||
"token": "<captcha token>", |
|
||||||
"error": "<error shown to the user>", |
|
||||||
"fail": "<fail logged to console>" |
|
||||||
} |
|
||||||
|
|
||||||
In the extension: |
|
||||||
|
|
||||||
if (response.token) { |
|
||||||
a = $.id("qrCapToken"), |
|
||||||
a.value = response.token, |
|
||||||
a.removeAttribute("disabled"), |
|
||||||
QR.submitDirect() |
|
||||||
} else { |
|
||||||
if (response.error) { |
|
||||||
QR.reloadCaptcha(), |
|
||||||
QR.btn.value = "Post", |
|
||||||
QR.showPostError(response.error)) |
|
||||||
} else { |
|
||||||
if (response.fail) { |
|
||||||
console.log(b.fail), |
|
||||||
QR.submitDirect() |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
qrCapToken is a hidden form field with the name captcha_token |
|
||||||
So when token exists in the json, send a normal reply with captcha_token |
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue