CryptoSite Redirect To earn

CryptoSite Redirect To earn (auto redirect and earn)

  1. // ==UserScript==
  2. // @name CryptoSite Redirect To earn
  3. // @namespace CryptoSite Redirect To earn
  4. // @description CryptoSite Redirect To earn (auto redirect and earn)
  5. // @version 0.1.6
  6. // @author Tomek
  7. // @match https://www.coinpayu.com/*
  8. // @match https://adbtc.top/*
  9. // @match https://adbch.top/*
  10. // @match https://faucetpay.io/*
  11. // @connect www.coinpayu.com
  12. // @connect adbtc.top
  13. // @connect adbch.top
  14. // @connect faucetpay.io
  15. // @noframes
  16. // @grant GM_xmlhttpRequest
  17. // @grant GM_setValue
  18. // @grant GM_getValue
  19. // ==/UserScript==
  20. (function() {
  21.  
  22. 'use strict';
  23. window.alert = function() {};
  24. window.confirm = function() {};
  25. //Do not execute if window is a pop up
  26. if(window.name){
  27. return;
  28. }
  29.  
  30. var count = 0;
  31. var clicked = false;
  32.  
  33. var websiteData = [
  34. {url : "https://www.coinpayu.com/dashboard/ads_surf", login: "", password: ""},
  35. {url : "https://adbtc.top/index/earn", login: "", password: ""},
  36. {url : "https://adbch.top/surf/browse", login: "", password: ""},
  37. {url : "https://faucetpay.io/ptc", login: "", password: ""},
  38. ];
  39.  
  40. var websiteMap = [
  41. //(start)
  42. {
  43. website: "coinpayu.com",
  44. defaultButtonSelectors: [".btn.btn-primary.btn-large"],
  45. loginSelectors: ["input[type=email]", "input[type=password]", "body > div:nth-child(1) > div > main > div > button"],
  46. captchaButtonSubmitSelector: [".btn.btn-default", "input[type=submit]"],
  47. allMessageSelectors: ["p.flow-text", "#pre > p"],
  48. additionalFunctions: coinpayu,
  49. messagesToCheckBeforeMovingToNextUrl: ["You have watched", "Links in surfing are over"],
  50. timeoutbeforeMovingToNextUrl: 500000
  51. },
  52. //2
  53. {
  54. website: "adbtc.top",
  55. defaultButtonSelectors: [".btn.btn-primary.btn-large"],
  56. loginSelectors: ["input[type=text]", "input[type=password]", "input[type=submit]"],
  57. captchaButtonSubmitSelector: [".btn.btn-default", "input[type=submit]"],
  58. allMessageSelectors: ["p.flow-text", "#pre > p"],
  59. additionalFunctions: adbtcTop,
  60. messagesToCheckBeforeMovingToNextUrl: ["You have watched", "Links in surfing are over"]
  61. },
  62. {
  63. website: "adbch.top",
  64. defaultButtonSelectors: ["#btstart"],
  65. loginSelectors: ["#mail", "#password", ".btn-large"],
  66. captchaButtonSubmitSelector: [".btn.btn-default", ".btn-large"],
  67. allMessageSelectors: ["h5"],
  68. additionalFunctions: adbtcTop,
  69. messagesToCheckBeforeMovingToNextUrl: ["You have looked at all the sites at the moment"]
  70. },
  71. {
  72. //Again ADBTC its important to check again
  73. website: "adbtc.top",
  74. defaultButtonSelectors: [".btn.btn-primary.btn-large"],
  75. loginSelectors: ["input[type=text]", "input[type=password]", "input[type=submit]"],
  76. captchaButtonSubmitSelector: [".btn.btn-default", "input[type=submit]"],
  77. allMessageSelectors: ["p.flow-text", "#pre > p"],
  78. additionalFunctions: adbtcTop,
  79. messagesToCheckBeforeMovingToNextUrl: ["You have watched", "Links in surfing are over"]
  80. },
  81.  
  82. {
  83. website: "faucetpay.io",
  84. defaultButtonSelectors: [".card-body .btn.btn-primary.btn-block"],
  85. loginSelectors: ["input[type=text]", "input[type=password]", "button[type=submit]"],
  86. captchaButtonSubmitSelector: [".btn.btn-lg.btn-danger", ".btn.btn-primary.btn-block"],
  87. allMessageSelectors: [".alert.alert-info"],
  88. messagesToCheckBeforeMovingToNextUrl: ["There are no ads available"],
  89. additionalFunctions: faucetpay,
  90. timeoutbeforeMovingToNextUrl: 380000
  91. },
  92. ];
  93.  
  94.  
  95. //Check if a string is present in Array
  96. String.prototype.includesOneOf = function(arrayOfStrings) {
  97.  
  98. //If this is not an Array, compare it as a String
  99. if (!Array.isArray(arrayOfStrings)) {
  100. return this.toLowerCase().includes(arrayOfStrings.toLowerCase());
  101. }
  102.  
  103. for (var i = 0; i < arrayOfStrings.length; i++) {
  104. if (this.toLowerCase().includes(arrayOfStrings[i].toLowerCase())) {
  105. return true;
  106. }
  107. }
  108. return false;
  109. }
  110.  
  111. var websiteDataValues = {};
  112.  
  113. for (let value of Object.values(websiteMap)) {
  114. if (window.location.href.includesOneOf(value.website)) {
  115. websiteDataValues.inputTextSelector = value.inputTextSelector;
  116. websiteDataValues.inputTextSelectorButton = value.inputTextSelectorButton;
  117. websiteDataValues.defaultButtonSelectors = value.defaultButtonSelectors;
  118. websiteDataValues.claimButtonSelector = value.claimButtonSelector;
  119. websiteDataValues.captchaButtonSubmitSelector = value.captchaButtonSubmitSelector;
  120. websiteDataValues.loginSelectors = value.loginSelectors;
  121. websiteDataValues.loginCaptcha = value.loginCaptcha;
  122. websiteDataValues.allMessageSelectors = value.allMessageSelectors;
  123. websiteDataValues.messagesToCheckBeforeMovingToNextUrl = value.messagesToCheckBeforeMovingToNextUrl;
  124. websiteDataValues.withdrawPageUrl = value.withdrawPageUrl;
  125. websiteDataValues.withdrawEnabled = value.withdrawEnabled;
  126. websiteDataValues.balanceSelector = value.balanceSelector;
  127. websiteDataValues.withdrawMinAmount = value.withdrawMinAmount;
  128. websiteDataValues.successMessageSelectors = value.successMessageSelectors;
  129. websiteDataValues.additionalFunctions = value.additionalFunctions;
  130. websiteDataValues.timeoutbeforeMovingToNextUrl = value.timeoutbeforeMovingToNextUrl;
  131. break;
  132. }
  133. }
  134.  
  135.  
  136. var login = "";
  137. var password = "";
  138.  
  139. for (let value of Object.values(websiteData)) {
  140. count = count + 1;
  141. if (value.url.includes(window.location.hostname)) {
  142. websiteDataValues.url = value.url;
  143. login = value.login;
  144. password = value.password;
  145. break;
  146. }
  147. }
  148.  
  149.  
  150. //Get the next Url from the website data map
  151. async function getNextUrl() {
  152.  
  153. //Go to the beginning if the end of the array is reached
  154. if (count >= websiteData.length) {
  155. websiteDataValues.nextUrl = websiteData[0].url;
  156. } else {
  157. websiteDataValues.nextUrl = websiteData[count].url;
  158. }
  159.  
  160. //Use case for overrding next Url
  161. if (websiteDataValues.overrideNextUrl) {
  162. websiteDataValues.nextUrl = websiteDataValues.overrideNextUrl;
  163. }
  164.  
  165. //Ping Test to check if a website is up before proceeding to next url
  166. pingTest(websiteDataValues.nextUrl);
  167. }
  168.  
  169. var isNextUrlReachable = false;
  170. //Get the next Url from the website
  171. function pingTest(websiteUrl) {
  172. console.log(websiteUrl);
  173. GM_xmlhttpRequest({
  174. method: "GET",
  175. url: websiteUrl,
  176. headers: {
  177. "Content-Type": "application/x-www-form-urlencoded"
  178. },
  179. timeout: 5000,
  180. onload: function(response) {
  181. //Website is reachable
  182. isNextUrlReachable = true;
  183. },
  184. onerror: function(e) {
  185. count = count + 1;
  186. getNextUrl();
  187. },
  188. ontimeout: function() {
  189. count = count + 1;
  190. getNextUrl();
  191. },
  192. });
  193.  
  194. }
  195.  
  196.  
  197. async function delay(ms) {
  198. return new Promise(resolve => setTimeout(resolve, ms))
  199. }
  200.  
  201.  
  202. var movingToNextUrl = false;
  203. async function goToNextUrl() {
  204. if (!movingToNextUrl) {
  205. movingToNextUrl = true;
  206. getNextUrl();
  207. while (!isNextUrlReachable) {
  208. await delay(3000);
  209. }
  210. window.location.href = websiteDataValues.nextUrl;
  211. }
  212. }
  213.  
  214.  
  215. //Default Setting: After 180 seconds go to next Url
  216. var delayBeforeMovingToNextUrl = 180000;
  217. if (websiteDataValues.timeoutbeforeMovingToNextUrl) {
  218. delayBeforeMovingToNextUrl = websiteDataValues.timeoutbeforeMovingToNextUrl;
  219. }
  220.  
  221. setTimeout(function() {
  222. goToNextUrl();
  223. }, delayBeforeMovingToNextUrl);
  224.  
  225.  
  226. //Wait for 5 seconds if it's in dashboard,
  227. if ((!window.location.href.includes("coinpayu")) && (window.location.href.includes("dashboard") || window.location.href.includes("page/user-admin"))) {
  228. setTimeout(function() {
  229. if (websiteDataValues.url) {
  230. window.location.href = websiteDataValues.url;
  231. }
  232. }, 5000);
  233. }
  234.  
  235.  
  236. //Returns true if message selectors are present
  237. function messageSelectorsPresent() {
  238. if (websiteDataValues.allMessageSelectors) {
  239. for (var j = 0; j < websiteDataValues.allMessageSelectors.length; j++) {
  240. for (var k = 0; k < document.querySelectorAll(websiteDataValues.allMessageSelectors[j]).length; k++) {
  241. if (document.querySelectorAll(websiteDataValues.allMessageSelectors[j])[k] &&
  242. (document.querySelectorAll(websiteDataValues.allMessageSelectors[j])[k].innerText.includesOneOf(websiteDataValues.messagesToCheckBeforeMovingToNextUrl) ||
  243. (document.querySelectorAll(websiteDataValues.allMessageSelectors[j])[k].value &&
  244. document.querySelectorAll(websiteDataValues.allMessageSelectors[j])[k].value.includesOneOf(websiteDataValues.messagesToCheckBeforeMovingToNextUrl)))) {
  245. return true;
  246. }
  247. }
  248. }
  249. }
  250. return false;
  251. }
  252.  
  253. function closeRepeatingAds() {
  254.  
  255. //Check if previous Ad is Same as Current Ad and Skip the Ad
  256. if (unsafeWindow.viewurl) {
  257. if (GM_getValue("adUrl") && GM_getValue("adUrl") == unsafeWindow.viewurl) {
  258. //Skip the Ad
  259. document.querySelector(".card > a").click();
  260. movingToNextUrl = true;
  261. } else {
  262. GM_setValue("adUrl", unsafeWindow.viewurl);
  263. }
  264.  
  265. }
  266.  
  267. }
  268.  
  269.  
  270. function adbtcTop() {
  271.  
  272. // For adbtc, special use case
  273. if (document.querySelector(".collection-item.hoverable") && document.querySelector(".collection-item.hoverable").innerText.includes("Sign in")) {
  274. document.querySelector(".collection-item.hoverable").click();
  275. }
  276.  
  277. for(let j=0; j<document.querySelectorAll(".dropdown-content.select-dropdown").length; j++){
  278. for(let i=0; i<document.querySelectorAll(".dropdown-content.select-dropdown")[j].getElementsByTagName("li").length; i++){
  279. if( document.querySelectorAll(".dropdown-content.select-dropdown")[j].getElementsByTagName("li")[i].innerText.includes("hCaptcha") &&
  280. !(document.querySelectorAll(".dropdown-content.select-dropdown")[j].getElementsByTagName("li")[i].getAttribute("class") &&
  281. document.querySelectorAll(".dropdown-content.select-dropdown")[j].getElementsByTagName("li")[i].getAttribute("class").includes("selected"))){
  282. document.querySelectorAll(".dropdown-content.select-dropdown")[j].getElementsByTagName("li")[i].click();
  283. break;
  284. }
  285. }
  286. }
  287.  
  288. if (document.querySelector("div.col.s4> a") && !document.querySelector("div.col.s4> a").className.includes("hide")) {
  289. document.querySelector("div.col.s4> a").click();
  290. }
  291.  
  292. if (window.location.href == "https://adbtc.top/index/" || window.location.href == "https://adbtc.top/index") {
  293. window.location.href = "https://adbtc.top/index/earn";
  294. }
  295.  
  296. if (window.location.href == "https://adbtc.top/index/earn" || window.location.href == "https://adbtc.top/index/earn/") {
  297. window.location.href = document.querySelectorAll(".collection.menu.colmen.nomarg > a")[0].href;
  298. }
  299.  
  300. //Use case for adbtc
  301. if (window.location.href.includes("adbtc.top/surf/browse")) {
  302. websiteDataValues.overrideNextUrl = document.querySelectorAll(".collection.menu.colmen.nomarg > a")[1].href;
  303. }
  304.  
  305. setInterval(function() {
  306. //Skip the Ad if the Ad closes on it's own for adbtc due to Adblocker or the script itself
  307. if (document.querySelector("#nenado") && !document.querySelector("#nenado").className.includes("hide") &&
  308. document.querySelector("#nenado").innerText.includes("You closed page")) {
  309. document.querySelector("#nenado > a").click();
  310. }
  311. }, 10000);
  312.  
  313. }
  314. function faucetpay() {
  315. //Block Pop Ups
  316. unsafeWindow.open = function(){};
  317.  
  318. if(document.querySelector("body").innerText.includes("This ad does not exist or has expired")){
  319. window.location.href = "https://faucetpay.io/ptc/";
  320. }
  321.  
  322. }
  323. function everve() {
  324. var oldfunction = unsafeWindow.open;
  325. var windowName = "";
  326.  
  327. function newFunction(params1, params2) {
  328.  
  329. console.log(params1 + params2);
  330. if (!params2 || params2 == "_blank") {
  331. windowName = "EvervepopUpWindow";
  332. } else {
  333. windowName = params2;
  334. }
  335.  
  336. return oldfunction(params1, windowName);
  337. };
  338.  
  339. unsafeWindow.open = newFunction;
  340.  
  341. unsafeWindow.onbeforeunload = function() {
  342. unsafeWindow.open('', windowName).close();
  343. };
  344.  
  345. var clicked = false;
  346. var interval = setInterval(function(){
  347.  
  348. if(document.querySelectorAll(".table_row[role=row]").length == 0){
  349. clearInterval(interval);
  350. goToNextUrl();
  351. return;
  352. }
  353.  
  354.  
  355. if(!clicked){
  356. for(let i=0; i< document.querySelectorAll(".table_row[role=row]").length;i++){
  357.  
  358. if(document.querySelectorAll(".table_row[role=row]")[i].style.display != "none"){
  359. document.querySelectorAll(".table_row[role=row] .btn-group")[i].querySelector("a").click();
  360. clicked = true;
  361. break;
  362. }
  363. }
  364. }else{
  365.  
  366. if( document.querySelector("#next_button").style.display != "none"){
  367. document.querySelector("#next_button > button").click();
  368. clicked = false;
  369. }
  370. }
  371.  
  372. },5000);
  373.  
  374. }
  375.  
  376.  
  377.  
  378. function coinpayu() {
  379.  
  380.  
  381. var oldfunction = unsafeWindow.open;
  382. var windowName = "";
  383.  
  384. function newFunction(params1, params2) {
  385.  
  386. console.log(params1 + params2);
  387. if (!params2 || params2 == "_blank") {
  388. windowName = "popUpWindow";
  389. } else {
  390. windowName = params2;
  391. }
  392. if (window.location.href == "https://www.coinpayu.com/dashboard/ads_active") {
  393. // opts = "height=800,width=800";
  394. }
  395.  
  396. console.log("WindowName is::" + windowName);
  397.  
  398. return oldfunction(params1, windowName);
  399. };
  400.  
  401. unsafeWindow.open = newFunction;
  402.  
  403. unsafeWindow.onbeforeunload = function() {
  404. unsafeWindow.open('', windowName).close();
  405. };
  406.  
  407.  
  408.  
  409.  
  410. var viewingAd = false;
  411. var i = 0;
  412.  
  413. setInterval(function() {
  414.  
  415. //Check if recaptcha or Hcaptcha is selected
  416.  
  417. if (document.querySelector(".form-group.form-code.captcha-type > div span.recaptcha-checked") &&
  418. (document.querySelector(".form-group.form-code.captcha-type > div span.recaptcha-checked").innerText.includes("Hcaptcha") ||
  419. document.querySelector(".form-group.form-code.captcha-type > div span.recaptcha-checked").innerText.includes("GoogleRecaptcha"))) {
  420.  
  421. } else {
  422. //Select either of Hcaptcha or Recaptcha
  423.  
  424. for (let i = 0; i < document.querySelectorAll(".form-group.form-code.captcha-type > div span").length; i++) {
  425.  
  426. if (document.querySelectorAll(".form-group.form-code.captcha-type > div span")[i].innerText.includes("Hcaptcha") ||
  427. document.querySelectorAll(".form-group.form-code.captcha-type > div span")[i].innerText.includes("GoogleRecaptcha")) {
  428. document.querySelectorAll(".form-group.form-code.captcha-type > div span")[i].click();
  429. break;
  430. }
  431.  
  432. }
  433.  
  434. }
  435.  
  436.  
  437. let count = document.querySelectorAll("[class='clearfix container-fluid bgwhite'] [title] span").length;
  438.  
  439. if (i < count && count > 0 && !viewingAd) {
  440. viewingAd = true;
  441. //Click
  442. document.querySelectorAll("[class='clearfix container-fluid bgwhite'] [title] span")[i].click();
  443. setTimeout(function() {
  444. //Wait for completion
  445. var waitForCompletionInterval = setInterval(function() {
  446. // ads has already been clicked
  447. if (document.querySelector(".alert-div.alert-red") && (document.querySelector(".alert-div.alert-red").innerText.includes("advertisement does not") ||
  448. document.querySelector(".alert-div.alert-red").innerText.includes("ads has already been clicked"))) {
  449. var tmp = document.querySelector(".alert-div.alert-red").innerHTML;
  450. document.querySelector(".alert-div.alert-red").innerHTML = tmp.replaceAll("advertisement does not", "")
  451. document.querySelector(".alert-div.alert-red").innerHTML = tmp.replaceAll("ads has already been clicked", "")
  452. i = i + 1;
  453. unsafeWindow.open('', windowName).close();
  454. viewingAd = false;
  455. clearInterval(waitForCompletionInterval);
  456. }
  457. if (document.querySelector("div.warning-ags") &&
  458. (document.querySelector("div.warning-ags").innerText.includes("You closed the advertisement too soon") ||
  459. document.querySelector("div.warning-ags").innerText.includes("The advertisement is not opened correctly"))){
  460. i = i + 1;
  461. unsafeWindow.open('', windowName).close();
  462. viewingAd = false;
  463. clearInterval(waitForCompletionInterval);
  464. }
  465.  
  466. if (count != document.querySelectorAll("[class='clearfix container-fluid bgwhite'] [title] span").length) {
  467.  
  468. //Ad viewed
  469. //Close the window
  470. setTimeout(function() {
  471. unsafeWindow.open('', windowName).close();
  472. viewingAd = false;
  473. clearInterval(waitForCompletionInterval);
  474. }, 3000);
  475. }
  476. }, 5000);
  477. }, 7000);
  478.  
  479. }
  480. if ((count == 0 || count == i) && !viewingAd) {
  481. //Go to next page
  482. i = 0;
  483. var pageCount = document.querySelectorAll("div.coinpayu-pagination > ul > li").length;
  484. if (pageCount >= 1 && document.querySelectorAll("div.coinpayu-pagination > ul > li")[pageCount - 1].className == "active") {
  485. //Stop or go to next url
  486. console.log("Ads End");
  487. goToNextUrl();
  488.  
  489. } else if (pageCount >= 1) {
  490. //go to next page
  491. document.querySelectorAll("div.coinpayu-pagination > ul > li")[pageCount - 1].click();
  492. }
  493.  
  494. }
  495.  
  496. }, 5000);
  497.  
  498. }
  499.  
  500.  
  501. var stopSolvingCaptcha = false;
  502.  
  503. function checkLoginSelectors() {
  504.  
  505. if (websiteDataValues.loginSelectors) {
  506. //Check if all login selectors are present
  507. let count = 0;
  508. for (let i = 0; i < websiteDataValues.loginSelectors.length; i++) {
  509. if (document.querySelector(websiteDataValues.loginSelectors[i])) {
  510. count++;
  511. }
  512.  
  513. }
  514.  
  515. if (count == websiteDataValues.loginSelectors.length) {
  516.  
  517. if (login.length > 0 && password.length > 0) {
  518. //Input Login
  519. document.querySelector(websiteDataValues.loginSelectors[0]).value = login;
  520.  
  521. //Input Password
  522. document.querySelector(websiteDataValues.loginSelectors[1]).value = password;
  523. } else {
  524. stopSolvingCaptcha = true;
  525. }
  526.  
  527. } else {
  528. stopSolvingCaptcha = true;
  529. }
  530.  
  531. } else {
  532. stopSolvingCaptcha = true;
  533. }
  534.  
  535. }
  536.  
  537.  
  538. setTimeout(function() {
  539.  
  540. checkLoginSelectors();
  541.  
  542. if (websiteDataValues.additionalFunctions) {
  543. websiteDataValues.additionalFunctions();
  544. }
  545.  
  546. //Look for all the default messages or errors before proceeding to next url
  547. //For other languages difference in the length of the strings can be compared or visibility of the style element
  548. if (!movingToNextUrl && messageSelectorsPresent()) {
  549. goToNextUrl();
  550. }
  551.  
  552.  
  553. //Check for all the default button selectors and click
  554. //This will only click the first selector found, so mention the selectors with parent element wherever required
  555. if (!movingToNextUrl && websiteDataValues.defaultButtonSelectors) {
  556. for (var i = 0; i < websiteDataValues.defaultButtonSelectors.length; i++) {
  557. if (document.querySelector(websiteDataValues.defaultButtonSelectors[i])) {
  558. document.querySelector(websiteDataValues.defaultButtonSelectors[i]).click();
  559. break;
  560. }
  561. }
  562. }
  563.  
  564. //Input the address and click the login button
  565. if (!movingToNextUrl && document.querySelector(websiteDataValues.inputTextSelector)) {
  566. document.querySelector(websiteDataValues.inputTextSelector).value = websiteDataValues.address;
  567. setTimeout(function() {
  568. if (websiteDataValues.inputTextSelectorButton && document.querySelector(websiteDataValues.inputTextSelectorButton)) {
  569. document.querySelector(websiteDataValues.inputTextSelectorButton).click();
  570. }
  571.  
  572. }, 5000);
  573. }
  574.  
  575. //Click the form button after solving captcha
  576. //Works for both recaptcha and hcaptcha
  577. var clicked = false;
  578. var captchaInterval = setInterval(function() {
  579. if (!stopSolvingCaptcha || !window.location.href.includes("login")) {
  580. try {
  581. if (!clicked && unsafeWindow.grecaptcha && unsafeWindow.grecaptcha.getResponse().length > 0) {
  582. for (let i = 0; i < websiteDataValues.captchaButtonSubmitSelector.length; i++) {
  583. if (document.querySelector(websiteDataValues.captchaButtonSubmitSelector[i])) {
  584. document.querySelector(websiteDataValues.captchaButtonSubmitSelector[i]).click();
  585. }
  586. }
  587. clicked = true;
  588.  
  589. clearInterval(captchaInterval);
  590. setTimeout(function() {
  591. if (messageSelectorsPresent()) {
  592. goToNextUrl();
  593. }
  594. }, 5000);
  595. }
  596. } catch (e) {
  597.  
  598. }
  599.  
  600. for (var hc = 0; hc < document.querySelectorAll("iframe").length; hc++) {
  601. if (!clicked && document.querySelectorAll("iframe")[hc] &&
  602. document.querySelectorAll("iframe")[hc].getAttribute("data-hcaptcha-response") &&
  603. document.querySelectorAll("iframe")[hc].getAttribute("data-hcaptcha-response").length > 0) {
  604. for (let i = 0; i < websiteDataValues.captchaButtonSubmitSelector.length; i++) {
  605. if (document.querySelector(websiteDataValues.captchaButtonSubmitSelector[i])) {
  606. document.querySelector(websiteDataValues.captchaButtonSubmitSelector[i]).click();
  607. }
  608. }
  609. clicked = true;
  610. clearInterval(captchaInterval);
  611. setTimeout(function() {
  612. if (messageSelectorsPresent()) {
  613. goToNextUrl();
  614. }
  615. }, 5000);
  616. }
  617. }
  618. }
  619.  
  620. }, 5000);
  621.  
  622.  
  623. }, 5000);
  624.  
  625.  
  626. window.onbeforeunload = function() {
  627. if (unsafeWindow.myWindow) {
  628. unsafeWindow.myWindow.close();
  629. }
  630. if (unsafeWindow.coinwin) {
  631. var tmp = unsafeWindow.coinwin;
  632. unsafeWindow.coinwin = {};
  633. tmp.close();
  634. }
  635.  
  636. };
  637.  
  638. })();