Created
February 22, 2025 16:23
-
-
Save Asikur22/b26c9b785cde284e6064527dfc177c11 to your computer and use it in GitHub Desktop.
WhatsApp Script to Download Images from Browser
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
// Download All images with click after 3 Seconds | |
let checkboxes = document.querySelectorAll('[role="button"][title^="Download"]'); | |
let index = 0; | |
function clickNextCheckbox() { | |
if (index < checkboxes.length) { | |
checkboxes[index].click(); | |
console.log(`Clicked checkbox ${index + 1}`); | |
index++; | |
setTimeout(clickNextCheckbox, 3000); // Wait 3 seconds before clicking the next one | |
} else { | |
console.log("All checkboxes clicked!"); | |
} | |
} | |
clickNextCheckbox(); |
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
// Download All images with click after 2 Seconds | |
let allCheckboxes = document.querySelectorAll('[role="button"][title^="Download"]'); | |
// Filter out checkboxes that are inside elements containing an audio download icon | |
let filteredCheckboxes = Array.from(allCheckboxes).filter(checkbox => | |
checkbox.closest('div').querySelector('[data-icon="audio-download"]') | |
); | |
let index = 0; | |
function clickNextCheckbox() { | |
if (index < filteredCheckboxes.length) { | |
filteredCheckboxes[index].click(); | |
console.log(`Clicked checkbox ${index + 1}`); | |
index++; | |
setTimeout(clickNextCheckbox, 2000); // Wait 2 seconds before clicking the next one | |
} else { | |
console.log("All checkboxes clicked!"); | |
} | |
} | |
clickNextCheckbox(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment