reCAPTCHA Helper

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

  1. // ==UserScript==
  2. // @name reCAPTCHA Helper
  3. // @icon https://www.gstatic.com/recaptcha/admin/favicon.ico
  4. // @version 1.1.4
  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://greatest.deepsurf.us/scripts/18449-recaptcha-form-autosubmit/
  11. // @homepageURL https://greatest.deepsurf.us/scripts/18449-recaptcha-form-autosubmit/
  12. // @supportURL https://greatest.deepsurf.us/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. if (isNotBlackListed(url)) {
  26. if (location.href.includes("google.com/recaptcha")) {
  27. var clickCheck = setInterval(function() {
  28. if (document.querySelectorAll(".recaptcha-checkbox-checkmark").length > 0) {
  29. clearInterval(clickCheck);
  30. document.querySelector(".recaptcha-checkbox-checkmark").click();
  31. }
  32. }, 50);
  33. } else {
  34. window.onload = readyToHelp;
  35. }
  36. }
  37.  
  38. function readyToHelp() {
  39. var execCheck = setInterval(function() {
  40. if (window.grecaptcha && window.grecaptcha.execute) {
  41. clearInterval(execCheck);
  42. try { window.grecaptcha.execute(); } catch(e) {}
  43. }
  44. }, 50);
  45. [...document.forms].forEach(form => {
  46. if (form.innerHTML.includes("google.com/recaptcha")) {
  47. var solveCheck = setInterval(function() {
  48. if (window.grecaptcha && !!grecaptcha.getResponse()) {
  49. clearInterval(solveCheck);
  50. form.submit();
  51. }
  52. }, 50);
  53. }
  54. });
  55. }
  56.  
  57. function isNotBlackListed(url) {
  58. return blacklistedUrls.every(bu => !url.includes(bu));
  59. }
  60. // ==/Code==