Advertisement
Guest User

Untitled

a guest
Sep 4th, 2024
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. _initCaptcha() {
  2. if (aib.makaba && !aib.isArchived) {
  3. loadCaptchaFn();
  4. } else {
  5. const capEl =
  6. $q('input[type="text"][name*="aptcha"], *[id*="captcha"], *[class*="captcha"]', this.form);
  7. if (!capEl) {
  8. this.cap = null;
  9. return;
  10. }
  11. this.cap = new Captcha(capEl, this.tNum);
  12. const updCapFn = () => {
  13. this.cap.addCaptcha();
  14. this.cap.updateOutdated();
  15. };
  16. this.txta.addEventListener('focus', updCapFn);
  17. if (this.files) {
  18. this.files.onchange = updCapFn;
  19. }
  20. this.form.addEventListener('click', () => this.cap.addCaptcha(), true);
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement