Skip to content

Commit

Permalink
Update demo.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev.Huang authored Jul 4, 2024
1 parent 1a2350b commit 1ee55b1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
<a href="https://github.com/Dev-Huang1/Air-Captcha"><img src="/assets/logo.svg" alt="AIR Captcha Logo"></a>
AIR Captcha
<div class="privacy-terms-links">
<a href="#">隐私</a><p>·</p><a href="#">文档</a>
<a href="#" id="privacy-link"></a><p>·</p><a href="#" id="docs-link"></a>
</div>
</div>
</div>
Expand Down Expand Up @@ -240,6 +240,8 @@ <h3 id="math-captcha-title">Solve the Math Problem</h3>
const mathCaptchaButton = document.getElementById('math-captcha-button');
const mathCaptchaError = document.getElementById('math-captcha-error');
const mathCaptchaTitle = document.getElementById('math-captcha-title');
const privacyLink = document.getElementById('privacy-link');
const docsLink = document.getElementById('docs-link');
let mouseMovements = [];
let isTouchDevice = 'ontouchstart' in document.documentElement;
let mathAnswer;
Expand All @@ -253,7 +255,9 @@ <h3 id="math-captcha-title">Solve the Math Problem</h3>
verificationError: "Please re-verify",
verifyButtonText: "Verify",
mathCaptchaTitle: "Solve the Math Problem",
mathCaptchaError: "Incorrect answer, please try again."
mathCaptchaError: "Incorrect answer, please try again.",
privacyLink: "Privacy",
docsLink: "Documentation"
},
zh: {
captchaLabel: "我不是机器人",
Expand All @@ -262,7 +266,9 @@ <h3 id="math-captcha-title">Solve the Math Problem</h3>
verificationError: "请重新验证",
verifyButtonText: "验证",
mathCaptchaTitle: "请完成此验证",
mathCaptchaError: "回答错误,请重试"
mathCaptchaError: "回答错误,请重试",
privacyLink: "隐私",
docsLink: "文档"
},
// Other translations...
};
Expand All @@ -282,6 +288,8 @@ <h3 id="math-captcha-title">Solve the Math Problem</h3>
mathCaptchaButton.textContent = translation.verifyButtonText;
mathCaptchaTitle.textContent = translation.mathCaptchaTitle;
mathCaptchaError.textContent = translation.mathCaptchaError;
privacyLink.textContent = translation.privacyLink;
docsLink.textContent = translation.docsLink;
}

const userLang = detectLanguage();
Expand Down

0 comments on commit 1ee55b1

Please sign in to comment.