Submit for MB_Solver

Sending the form after solving the captcha

当前为 2022-11-20 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Submit for MB_Solver
  3. // @namespace Violentmonkey Scripts
  4. // @version 1.3
  5. // @description Sending the form after solving the captcha
  6. // @author MultiBot
  7. // @match *://*/*
  8. // @run-at document-end
  9. // @grant none
  10. // ==/UserScript==
  11. (function() {
  12. 'use strict';
  13. function _Search_Captcha(){
  14. if (window.grecaptcha && !window.grecaptcha.getResponse()){
  15. return false;
  16. }
  17. if (typeof window.hcaptcha=="object" && !window.hcaptcha.getResponse()){
  18. return false;
  19. }
  20. if (typeof window.ACPuzzleInfo=="object" && !document.querySelector("#adcopy_response").value){
  21. return false;
  22. }
  23. if (document.querySelector('input#antibotlinks') && !document.querySelector('input#antibotlinks').value){
  24. return false;
  25. }
  26. return true;
  27. }
  28. function _Search_Selector(query,action){
  29. if (document.querySelector(query)) {
  30. var timer = setInterval(function() {
  31. if (_Search_Captcha()) {
  32. document.querySelector(query)[action](); clearInterval(timer);
  33. }
  34. }, 5000);
  35. }
  36. }
  37. let arr_modal = ['[data-target="#claim"]'];
  38. for(let key of arr_modal){
  39. if (document.querySelector(key)){
  40. document.querySelector(key).click();
  41. break;
  42. }
  43. }
  44. let arr_form = ['form[action*="/faucet/verify"]','form[action*="/firewall/verify"]','form[action*="/auth/login"]'];
  45. for(let key of arr_form){
  46. _Search_Selector(key,'submit');
  47. }
  48. let arr_click = ['.btn-success[type="submit"]'];
  49. for(let key of arr_click){
  50. _Search_Selector(key,'click');
  51. }
  52. })();