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

Need to manually click delete button each time #62

Open
suppafly19 opened this issue Mar 7, 2024 · 6 comments
Open

Need to manually click delete button each time #62

suppafly19 opened this issue Mar 7, 2024 · 6 comments

Comments

@suppafly19
Copy link

Great script! I'm seeing that after it runs the select on all of the photos, you get a prompt in the corner asking you to delete. If you don't manually click on delete it then just unselecting everything after a few seconds and does the same again in a cycle. If it was possible for it to select and click the button too so the process could be fully automated and left to run by itself

@jwsims
Copy link

jwsims commented Mar 13, 2024

The selector for the confirmation button has changed. You can try the following method. If this doesn't work, you must obtain the selector from the button manually. To do this, go to the Elements tab in the developer tools, select the confirmation button when it appears, highlight the HTML of the button, right-click, and choose "Copy selector". ~Good Luck!

const ELEMENT_SELECTORS = { checkboxClass: '.ckGgle', languageAgnosticDeleteButton: 'div[data-delete-origin] button', deleteButton: 'button[aria-label="Delete"]', confirmationButton: '#yDmH0d > div.VfPpkd-Sx9Kwc.cC1eCc.UDxLd.PzCPDd.V639qd.bvQPzd.oEOLpc.A9Uzve.VfPpkd-Sx9Kwc-OWXEXe-FNFY6c > div.VfPpkd-wzTsW.O4g5Md.iWO5td > div > div.VfPpkd-cnG4Wd.m5OsGf > div > div.VfPpkd-T0kwCb.IdSMxc > button.VfPpkd-LgbsSe.VfPpkd-LgbsSe-OWXEXe-k8QpJ.nCP5yc.AjY5Oe.LQeN7.kDryjd' }

@caelchristian
Copy link

I just made a PR to fix this. :)

@kiwijunglist
Copy link

Thank you that worked for me, appreciate it!

Here is the changed console code to copy & paste (in case someone doesn't understand what to do with the above code)

https://pastebin.com/gemQ7wnX

@Xorboo
Copy link

Xorboo commented May 13, 2024

FYI. the following confirmation button selector worked for me today
confirmationButton: '#yDmH0d > div.VfPpkd-Sx9Kwc.cC1eCc.UDxLd.PzCPDd.V639qd.oEOLpc.A9Uzve.VfPpkd-Sx9Kwc-OWXEXe-FNFY6c > div.VfPpkd-wzTsW.O4g5Md.iWO5td > div > div.VfPpkd-cnG4Wd.m5OsGf > div > div.VfPpkd-T0kwCb.IdSMxc > button.VfPpkd-LgbsSe.VfPpkd-LgbsSe-OWXEXe-k8QpJ.nCP5yc.AjY5Oe.LQeN7.kDryjd'

@csBlackWolf
Copy link

FYI. the following confirmation button selector worked for me today confirmationButton: '#yDmH0d > div.VfPpkd-Sx9Kwc.cC1eCc.UDxLd.PzCPDd.V639qd.oEOLpc.A9Uzve.VfPpkd-Sx9Kwc-OWXEXe-FNFY6c > div.VfPpkd-wzTsW.O4g5Md.iWO5td > div > div.VfPpkd-cnG4Wd.m5OsGf > div > div.VfPpkd-T0kwCb.IdSMxc > button.VfPpkd-LgbsSe.VfPpkd-LgbsSe-OWXEXe-k8QpJ.nCP5yc.AjY5Oe.LQeN7.kDryjd'

Thank you. This change worked for me.
Here is the full code with this fix: https://pastebin.com/5KKmmKMt

@Lyapsus
Copy link

Lyapsus commented May 17, 2024

How about something more elegant like

buttons.confirmation_button = Array.from(document.querySelectorAll('button')).find(button => button.textContent.trim() === 'Move to trash');

English version of the site is already required so why not

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

7 participants