Skip to content

Instantly share code, notes, and snippets.

@paulbrodner
Last active June 25, 2025 14:26
Show Gist options
  • Select an option

  • Save paulbrodner/680a8cf9923dc0ddca02faaa2cef7547 to your computer and use it in GitHub Desktop.

Select an option

Save paulbrodner/680a8cf9923dc0ddca02faaa2cef7547 to your computer and use it in GitHub Desktop.
select all google photos if you want to delete them in bulk!
// 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