Last active
December 2, 2023 03:42
-
-
Save krsntn/9dfb64f46b81dd1060f9fd5f9ba5c321 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const claims = () => { | |
| let clickCount = 1; | |
| const claimButtons = Array.from(document.querySelectorAll('div > span')) | |
| .filter(span => span.textContent.includes('Claim')) | |
| .map(span => span.closest('div')); | |
| const buttonCount = claimButtons.length; | |
| console.log(`Total Claim Button: ${buttonCount}`); | |
| const interval = setInterval(() => { | |
| if (clickCount > buttonCount) { | |
| clearInterval(interval); | |
| console.log('Done!'); | |
| } else { | |
| console.log(`Click button: ${clickCount}/${buttonCount}`); | |
| if (claimButtons[clickCount - 1]) claimButtons[clickCount - 1].click(); | |
| clickCount++; | |
| } | |
| }, 1000); | |
| }; | |
| const divs = document.querySelectorAll('div[style*="absolute"]'); | |
| let num = 0; | |
| const intervalScroll = setInterval(() => { | |
| if (num > divs.length - 1) { | |
| clearInterval(intervalScroll); | |
| claims(); | |
| } | |
| if (divs[num]) divs[num].scrollIntoView(); | |
| num++; | |
| }, 300); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment