You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Clover/docs/checkcaptcha.txt

46 lines
1.1 KiB

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