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
(async () => { | |
const delay = (ms) => new Promise((res) => setTimeout(res, ms)); | |
const waitForElement = async (selector, timeout = 5000) => { | |
const start = Date.now(); | |
while (Date.now() - start < timeout) { | |
const el = document.querySelector(selector); | |
if (el) return el; | |
await delay(100); | |
} |
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
// Step 1: Click the initial "View" button to open the modal | |
const viewButton = document.querySelector('#interested-btn'); | |
if (viewButton) { | |
viewButton.click(); | |
console.log('%c🚀 Opened modal by clicking View button', 'color: green; font-weight: bold;'); | |
} else { | |
console.log('%c⚠️ View button not found — maybe modal is already open.', 'color: orange; font-weight: bold;'); | |
} | |
let applyCount = 0; |