mirror of
https://github.com/sigmasternchen/axowall
synced 2025-03-15 00:28:54 +00:00
add option to change text
This commit is contained in:
parent
a285adb62e
commit
c18f53488e
2 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
data-challenge-url="/challenge.json"
|
||||
data-success-callback="console.log"
|
||||
data-input-selector=".response"
|
||||
data-text="Bepp Boop Click Whirr"
|
||||
></div>
|
||||
<input type="text" value="" class="response">
|
||||
</body>
|
||||
|
|
|
@ -11,6 +11,7 @@ const CLASS_SILENT = "silent";
|
|||
const DATA_CHALLENGE_URL = "data-challenge-url";
|
||||
const DATA_SUCCESS_CALLBACK = "data-success-callback";
|
||||
const DATA_INPUT_SELECTOR = "data-input-selector";
|
||||
const DATA_TEXT = "data-text";
|
||||
|
||||
const findHashWithPrefix = async (algo: string, hashPrefixBits: number, inputPrefix: string): Promise<string> => {
|
||||
const hashPrefix = new Uint8Array(Array(Math.ceil(hashPrefixBits / 8)).map(_ => 0));
|
||||
|
@ -30,7 +31,7 @@ function initCaptchaContentAndGetCheckbox(captcha: Element): Element {
|
|||
checkbox.classList.add(CLASS_CHECKBOX, CLASS_LOADING);
|
||||
|
||||
const text = document.createElement("span");
|
||||
text.innerText = "I am not a robot";
|
||||
text.innerText = captcha.getAttribute(DATA_TEXT) || "I am not a robot";
|
||||
|
||||
captcha.append(checkbox, text);
|
||||
|
||||
|
|
Loading…
Reference in a new issue