Advertisement
aldikhan13

war ticket

Aug 24th, 2024
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Author: Restu Wahyu Saputra
  3.  * Created At: 15 November 2023 - until now
  4. */
  5.  
  6. const cickBuyBtn = document.querySelector('.YouryBtnBuy')
  7. cickBuyBtn.click()
  8.  
  9. const checkboxBuyBtn = document.querySelector('.custom-checkbox > input[type = checkbox]')
  10. checkboxBuyBtn.click()
  11.  
  12. checkboxBuyBtn.addEventListener('click', function () {
  13.     if (checkboxBuyBtn.checked) {
  14.         checkboxBuyBtn.checked = false
  15.     } else {
  16.         checkboxBuyBtn.checked = true
  17.     }
  18. })
  19.  
  20. let count = 0
  21.  
  22. for (let i = 0; i < document.links.length; i++) {
  23.     let link = document.links[i].href
  24.     let isMatch = link?.match(/(widget|widget.loket|widget.loket.com|widget.tiket|widget.tiket.com|widget.ticket|widget.ticket.com|queue|queue.tiket|queue.tiket.com|queue.ticket|queue.ticket.com|event-queue|event-queue.tix.id)/gi)
  25.  
  26.     if (Array.isArray(isMatch) && isMatch.length > 0) {
  27.         if (link) {
  28.             window.open(link, '_blank')
  29.  
  30.             const clickBuyBtn = document.querySelector('#purchaseButton, #purchaseButton > a, #purchaseButton > img, #purchaseButton > img > a')
  31.             clickBuyBtn.click()
  32.         } else {
  33.             window.location.href = 'https://greendayjkt.com'
  34.         }
  35.         break
  36.     } else {
  37.         console.log('Checking Target Url Link: ', link)
  38.     }
  39.  
  40.     count++
  41.     console.log('Total Link: ', count)
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement