diff --git a/docs/checkcaptcha.txt b/docs/checkcaptcha.txt new file mode 100644 index 00000000..99730f5f --- /dev/null +++ b/docs/checkcaptcha.txt @@ -0,0 +1,46 @@ +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= +response= + + +returns json: +{ + "token": "", + "error": "", + "fail": "" +} + +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 + + +