ergildo / emerics yori

// ==UserScript==
// @name        emerics yori
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  emerics yori!
// @author      emerics yori
// @license MIT
// @match        https://app.position.exchange/vault
// @include      https://app.position.exchange/vault
// @grant        none
// ==/UserScript==

(function () {
  'use strict';
  // alert('ola');
  setInterval(seguir, 1);
  // alert('call');

  function seguir() {
    // alert('enter');
    var claimBtn = document.getElementsByClassName('chakra-button css-owsrz2')[0];
    //  alert(claimBtn.textContent);
    if (!claimBtn.disabled) {
      claimBtn.click();
      setInterval(seguir, 400000);
    }
    else {
      console.log('Element:' + claimBtn.textContent)
      console.log('Claim is not available yet!')
    }

  }

})();