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
| let timeoutId; | |
| const createBonusRewardCollector = (timeout = 5000) => { | |
| timeoutId = setTimeout(() => { | |
| const element = document.querySelector('.ScCoreButton-sc-ocjdkq-0.ScCoreButtonSuccess-sc-ocjdkq-5'); | |
| const dateTime = Intl.DateTimeFormat('pt-BR', { timeStyle: 'medium' }).format(new Date()); | |
| if(!element) { | |
| console.log(`[ ${dateTime} ] Bonus not available`); | |
| const seconds = 60 - (new Date()).getSeconds(); |