tamhopkiem117 / dopzx

// ==UserScript==
// @namespace    coin
// @name         dopzx
// @description  dopzx
// @copyright    2021
// @license      CC-BY-SA-3.0; http://creativecommons.org/licenses/by-sa/3.0/
// @license      MIT
// @version      1.0.0
// @include      https://my.dropz.xyz/*
// @grant        none
// ==/UserScript==

// ==OpenUserJS==
// @author       KhanhhNe
// ==/OpenUserJS==

/*jshint esversion: 9 */
/*jshint asi: true */

var autoClick = true;
var autoScroll = true;
var autoWithdraw = true;
setInterval(function () {
  if (document.getElementsByName('h-captcha-response').length > 0) {
    if (document.getElementsByName('h-captcha-response')[0].value != '') {
      document.getElementsByClassName('btn btn-info btn-sm mt-3 mb-4')[0].click();

    }
  }
  else {
    if (document.getElementsByClassName('btn btn-info btn-sm mt-3 mb-4').length > 0) {
      if (autoClick) {
        var buttonSubmit = document.getElementsByClassName('btn btn-info btn-sm mt-3 mb-4')[0];
        if (buttonSubmit.innerText.indexOf('Website') > -1) {
          var fclick = buttonSubmit.getAttribute('onclick');
          if (fclick.indexOf(';') > -1) {
            buttonSubmit.setAttribute('onclick', fclick.split(';')[1]);
          }
          buttonSubmit.click();
        }
      }
    }
  }
}, 5000);

setInterval(function () {
  if (autoScroll) {
    if (document.getElementsByClassName('btn btn-info btn-sm mt-3 mb-4').length > 0) {
      document.getElementsByClassName('horizontal-menu')[0].style.display = 'none';
      document.getElementById('payout').scrollIntoView();
    }
  }
}, 2000);

var isPay = false;
setInterval(function () {
  if (autoWithdraw) {
    if (!isPay) {

      if (document.getElementById('swal2-title') &&
        (document.getElementById('swal2-title').innerText == 'Payment has been sent' ||
          document.getElementById('swal2-title').innerText == 'Minimum payout is 300 Drops')) {
        isPay = true;
      }
      else {
        var bl = document.getElementById('balance_lbl').innerText.split('.')[0].replace(',', '');
        if (bl > 1000) {
          document.getElementById('payout').click();
        }
      }

    }
    if (document.getElementsByClassName('swal2-confirm').length > 0) {
      document.getElementsByClassName('swal2-confirm')[0].click();
    }
  }
}, 5000);