Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select all photo script #61

Open
shtse8 opened this issue Jan 26, 2024 · 3 comments
Open

Select all photo script #61

shtse8 opened this issue Jan 26, 2024 · 3 comments

Comments

@shtse8
Copy link

shtse8 commented Jan 26, 2024

let t = 0
while (true) {
  let checkboxes = [...document.querySelectorAll('.ckGgle')].filter((x) => x.ariaChecked == 'false')
if (checkboxes.length > 0) {
    t = 0
  checkboxes.forEach((x) => x.click());
  document.getElementsByClassName("yDSiEe uGCjIb zcLWac eejsDc TWmIyd")[0].scrollBy(0, window.outerHeight);
} else {
    t++;
    if (t > 30) break
}
    await new Promise(resolve => setTimeout(resolve, 100));
}

enjoy

@xob0t
Copy link

xob0t commented Jan 27, 2024

works great!

@shtse8
Copy link
Author

shtse8 commented Jan 27, 2024

I have reimplemented the whole script to improve the performance of removing all photos.
https://github.com/shtse8/google-photos-delete-tool/blob/master/delete_photos.js

@suppafly19
Copy link

This script here seems to work the best. I have noticed it is inconsistent. If i put in all photos it doesn't work. However if i would be in 25000 or so it will start selecting them all and get down to close to that amount before it just stalls. Sometimes, it stops just after 6000 or so or less. It usually does the initially selecting quite quickly in 1 or 2 mins. Which is way faster than if you were manually doing it. So definitely appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants