CryptoWorld

Free TRX faucet

  1. // ==UserScript==0
  2. // @name CryptoWorld
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.11
  5. // @description Free TRX faucet
  6. // @author Worldcrypto
  7. // @match https://claimtrx.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=cryptoearnfaucet.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Register via https://claimtrx.com/?r=422226 and enter your email addreass and password on line no 25
  17.  
  18. let sites = [
  19. {faucetUrl: "https://claimtrx.com/faucet", email: "", password: "", },
  20. ];
  21.  
  22. let autoRotateTimerinMin = 1;
  23.  
  24. let sitesMap = [
  25. {
  26. websiteUrl:"https://claimtrx.com",
  27. homePageCheck : ".container .herotext",
  28. loginSelectors :["#email", "#password"],
  29. //submitFormSelectors : ["form[action*='/verify'] button[type=submit]", "form[action*='/verify'] input.form-control"],
  30. submitFormSelectors : ["form[action*='/verify'] button[type=submit]"],
  31. claimCaptchaSelector : [".rscapimg", "selectedOption"],
  32. hasLimit : false,
  33. },
  34.  
  35. ]
  36.  
  37. function movetonext() {
  38. if (currentIndex === sites.length - 1) {
  39. currentIndex = 0;
  40. console.log("All sites visited. Starting from 0 again.");
  41. } else {
  42. currentIndex++;
  43. }
  44. window.location.href = sites[currentIndex].faucetUrl;
  45. }
  46.  
  47. // Check if captcha is checked
  48. function isCaptchaChecked() {
  49. return grecaptcha && grecaptcha.getResponse().length !== 0;
  50. }
  51.  
  52. function visibleCheck(elm) {
  53. if(!elm.offsetHeight && !elm.offsetWidth) { return false; }
  54. if(getComputedStyle(elm).visibility === 'hidden') { return false; }
  55. return true;
  56. }
  57.  
  58. let check_address = window.location.origin;
  59. let currentFaucetUrl = new URL(window.location.href);
  60. let currentOrigin = currentFaucetUrl.origin;
  61. let currentIndex = sites.findIndex(site => site.faucetUrl.includes(currentOrigin));
  62. let websiteIndex = sitesMap.findIndex(website => website.websiteUrl.includes(currentOrigin));
  63.  
  64. function processSite(site) {
  65.  
  66. if(window.location.href.includes(check_address) && document.querySelector(sitesMap[websiteIndex].homePageCheck)){
  67. window.location.replace(sitesMap[websiteIndex].websiteUrl +'/login');
  68. }
  69.  
  70. if (window.location.href.includes(sitesMap[websiteIndex].websiteUrl +'/login')) {
  71. setInterval(function() {
  72. if (document.querySelector(sitesMap[websiteIndex].loginSelectors[0])) {
  73. document.querySelector(sitesMap[websiteIndex].loginSelectors[0]).value = site.email;
  74. }
  75. if (document.querySelector(sitesMap[websiteIndex].loginSelectors[1])) {
  76. document.querySelector(sitesMap[websiteIndex].loginSelectors[1]).value = site.password;
  77. }
  78.  
  79. if(!sitesMap[websiteIndex].loginImageCapatha){
  80. if (document.querySelector("button[type='submit']")) {
  81. document.querySelector("button[type='submit']").click();
  82. }
  83. }else{
  84. document.querySelectorAll(sitesMap[websiteIndex].claimCaptchaSelector[0]).forEach(function(img) {
  85. if (img.classList.contains(sitesMap[websiteIndex].claimCaptchaSelector[1])) {
  86. // Do something if the element has the selectedOption class
  87. console.log("Image is selected!");
  88. document.querySelector("button[type='submit']").click();
  89. } else {
  90. // Do something if the element does not have the selectedOption class
  91. console.log("Image is not selected!");
  92. }
  93. });
  94. }
  95.  
  96. }, 6000);
  97. }
  98.  
  99. if (window.location.href.includes(sitesMap[websiteIndex].websiteUrl +'/dashboard')) {
  100. window.location.replace(sitesMap[websiteIndex].websiteUrl +'/faucet');
  101. }
  102.  
  103. if(window.location.href.includes(sitesMap[websiteIndex].websiteUrl +'/faucet')){
  104.  
  105. setInterval(function(){
  106. if(!sitesMap[websiteIndex].claimCaptchaSelector){
  107. if(document.querySelector(sitesMap[websiteIndex].submitFormSelectors[0]) && document.querySelector(sitesMap[websiteIndex].submitFormSelectors[1]).value != ""){
  108. document.querySelector(sitesMap[websiteIndex].submitFormSelectors[0]).click();
  109. }
  110. }else{
  111. document.querySelectorAll(sitesMap[websiteIndex].claimCaptchaSelector[0]).forEach(function(img) {
  112. if (img.classList.contains(sitesMap[websiteIndex].claimCaptchaSelector[1])) {
  113. // Do something if the element has the selectedOption class
  114. console.log("Image is selected!");
  115. if(document.querySelectorAll(sitesMap[websiteIndex].submitFormSelectors[2]) && document.querySelectorAll(sitesMap[websiteIndex].submitFormSelectors[2]).value != ""){
  116. document.querySelector(sitesMap[websiteIndex].submitFormSelectors[0]).click();
  117. }else{
  118. document.querySelector(sitesMap[websiteIndex].submitFormSelectors[0]).click();
  119. }
  120. } else {
  121. // Do something if the element does not have the selectedOption class
  122. console.log("Image is not selected!");
  123. }
  124. });
  125. }
  126.  
  127. if(document.querySelector(".swal2-shown .swal2-popup .swal2-confirm")){
  128. document.querySelector(".swal2-shown .swal2-popup .swal2-confirm").click();
  129. }
  130.  
  131. if(document.querySelector(".next-button .btn.btn-primary") && visibleCheck(document.querySelector(".next-button .btn.btn-primary"))){
  132. document.querySelector(".next-button .btn.btn-primary").click();
  133. }
  134.  
  135. let string = document.querySelector("#Claim > div.text-center.mb-3 > div.row > div.text-primary.col > p:nth-child(1)");
  136. if(string){
  137. let parts = string.innerText.split("/");
  138. if (parts[0] === "0") {
  139. console.log("The first value is 0.");
  140. movetonext()
  141. } else {
  142. console.log("The first value is not 0.");
  143. }
  144. }
  145.  
  146. }, 10000)
  147.  
  148. setInterval(function(){
  149.  
  150. if(!document.querySelector(sitesMap[websiteIndex].submitFormSelectors[0])){
  151. movetonext()
  152. }
  153.  
  154. }, autoRotateTimerinMin * 60000)
  155. }
  156. }
  157.  
  158. // Start processing the first site
  159. processSite(sites[currentIndex]);
  160.  
  161. })();