Skip to content

Instantly share code, notes, and snippets.

@avipars
Last active June 22, 2025 13:31
Show Gist options
  • Save avipars/347895b291ed399324326a1d9d3cfe59 to your computer and use it in GitHub Desktop.
Save avipars/347895b291ed399324326a1d9d3cfe59 to your computer and use it in GitHub Desktop.
yad2 הקפצה
function clickBumpButtons() {
async function clickSequentially() {
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
const buttons = Array.from(document.querySelectorAll('span[class="action-button_actionButtonLabel__WWXHf"]'))
.filter(btn => btn.textContent.trim() === 'הקפצה');
for (const btn of buttons) {
console.log('Clicking:', btn);
btn.click();
await delay(1500); // delay to avoid issues or throttling
}
}
clickSequentially();
}
@avipars
Copy link
Author

avipars commented Jun 22, 2025

function clickBumpButtons() {
async function clickSequentially() {
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));

const buttons = Array.from(document.querySelectorAll('span[class="action-button_actionButtonLabel__WWXHf"]'))
  .filter(btn => btn.textContent.trim() === 'הקפצה');

for (const btn of buttons) {
  console.log('Clicking:', btn);
  btn.dispatchEvent(new MouseEvent('click', {
    bubbles: true,
    cancelable: true,
    view: window
  }));
  await delay(1500); // delay to avoid throttling
}

}

clickSequentially();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment