Last active
June 25, 2025 14:26
-
-
Save paulbrodner/680a8cf9923dc0ddca02faaa2cef7547 to your computer and use it in GitHub Desktop.
select all google photos if you want to delete them in bulk!
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
| // minimize the view and run in console | |
| document.querySelectorAll('div[aria-label*="Select all photos"]').forEach(div => { | |
| // Only click if not already selected (check for common selection indicators) | |
| const isSelected = div.getAttribute('aria-checked') === 'true' || | |
| div.classList.contains('selected') || | |
| div.classList.contains('active') || | |
| div.classList.contains('checked'); | |
| if (!isSelected) { | |
| div.click(); | |
| } | |
| }); | |
| // can scroll next | |
| // const elements = [...document.querySelectorAll('div[aria-label*="Select all photos"]')]; | |
| // elements.pop()?.scrollIntoView({behavior: 'smooth'}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment