reCAPTCHA Helper

This automatically clicks or executes on any reCAPTCHA on the webpage and submits its form directly after you solved it.

当前为 2018-02-02 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name reCAPTCHA Helper
  3. // @icon https://www.gstatic.com/recaptcha/admin/favicon.ico
  4. // @version 1.1.1
  5. // @description This automatically clicks or executes on any reCAPTCHA on the webpage and submits its form directly after you solved it.
  6. // @author Royalgamer06
  7. // @include *
  8. // @grant none
  9. // @run-at document-start
  10. // @namespace https://greasyfork.org/scripts/18449-recaptcha-form-autosubmit/
  11. // @homepageURL https://greasyfork.org/scripts/18449-recaptcha-form-autosubmit/
  12. // @supportURL https://greasyfork.org/scripts/18449-recaptcha-form-autosubmit/feedback/
  13. // ==/UserScript==
  14.  
  15. // ==Configuration==
  16. const blacklistedUrls = [
  17. "miped.ru",
  18. "www.indiegala",
  19. "https://gleam.io/"
  20. ];
  21. // ==/Configuration==
  22.  
  23. // ==Code==
  24. const url = window.location !== window.parent.location ? document.referrer : document.location.href;
  25.  
  26. if (!isBlackListed(url)) {
  27. if (location.href.includes("google.com/recaptcha")) {
  28. var clickCheck = setInterval(function() {
  29. if (document.querySelectorAll(".recaptcha-checkbox-checkmark").length > 0) {
  30. clearInterval(clickCheck);
  31. document.querySelector(".recaptcha-checkbox-checkmark").click();
  32. }
  33. }, 50);
  34. } else {
  35. window.onload = readyToHelp;
  36. }
  37. }
  38.  
  39. function readyToHelp() {
  40. try {
  41. grecaptcha.execute();
  42. } finally {
  43. [...document.querySelectorAll(".g-recaptcha")].forEach(captcha => {
  44. let form = captcha.closest("form");
  45. var solveCheck = setInterval(function() {
  46. if (grecaptcha.getResponse().length > 0) {
  47. clearInterval(solveCheck);
  48. form.submit();
  49. }
  50. }, 50);
  51. });
  52. }
  53. }
  54.  
  55. function isBlackListed(url) {
  56. return blacklistedUrls.every(bu => !url.includes(bu));
  57. }
  58. // ==/Code==