zaporn.net
How to delete all pictures of ONE gallery at once

How to delete all pictures of ONE gallery at once

Update (Nov. 13th)

Thanks to fellow user star1962-1, there is an easier way to delete all pictures of one gallery at once:

1. Go to https://xhamster.com/my/photos
2. Click on the "Pencil button" (Edit) of the gallery you want to delete
3. The gallery will open in a new tab
4. Switch to "Mobile Version" (bottom of the page)
5. Click on the Pencil icon (Edit) located at the top right side of your gallery page. The gallery editor will open in the same tab.
6. Click on the "Remove gallery" link at the top left side of the page
7. Click on the button "Yes" on the pop-up "Remove gallery: Are you sure you want to remove current gallery?"

And that it is! Now repeat for each gallery you want to delete.

Given that this procedure is easier and it seems to work in any browser/OS combination and for all users that tried it, please consider my script as deprecated.

Thanks a lot!.

=====================

A lot of people are asking me how to delete all their photo galleries at once. It is not easy as XH doesn't want you to delete your content because they use YOUR content to sell ads (their main source of income). because of this, you need to delete each picture one at a time.

I wrote a procedure to delete all pictures of ONE gallery at once (Warning: This will delete all the pictures of your gallery and there is no provision to recover the pictures). Remember that you cannot upload new pictures to your account unless you are a verified user.

1. Go to https://xhamster.com/my/photos
2. Click on the "Pencil button" (Edit) of the gallery you want to delete
3. The gallery will open in a new tab
4. On the gallery tab that just opened, open the Javascript Console pressing Command + Option + J (Mac) or Control + Shift + J (Windows, Linux, Chrome OS).

Note: Please make sure that you're opening the Javascript Console in the Edit Gallery tab (the url should start with https://xhamster.com/my/edit/photos/) and not the My Content tab (https://xhamster.com/my/photos) to avoid the error Uncaught TypeError: buttons_delete.click is not a function.

5. Paste the following three lines of code at the console prompt

var buttons_delete = document.getElementsByClassName('delete delete-photo');
for(var i = 0; i < buttons_delete.length; i++)
buttons_delete.click();


6. Press the "Enter" key and watch how the pictures are being deleted
7. If you have several pages of pictures in your gallery, you will need to repeat steps 5 and 6 until all pictures are deleted.
8. Start again with step 1 to delete another gallery.

If this procedure works for you, please copy it to your profile or to a post in your account and mention it to your friends and followers. I'm sure XH will delete this post. Thanks!
Published by PPataquiva
2 years ago
Comments
38
Please or to post comments
So, where are all we migrating now? any suggestion?
Reply
PPataquiva
to FloydFan64 : You're welcome. I wish I could do more.
Reply Show original comment Hide
Thank you! This will definitely expedite the process.
Reply
to PPataquiva : I certainly will do that, thanks for your effort
Reply Show original comment Hide
PPataquiva
to KymppiLasse : You're welcome! Please continue sharing the procedure with other users before XH deletes this post. Thanks!
Reply Show original comment Hide
PPataquiva
to paarrth : The business model of XH is to profit from user-contributed content to sell ad space. Ads are the main source of income for XH. Now that we are restricted to uploading content, they will continue making a profit in the future if we left XH or our accounts are deleted and our content stays in their platform. That's why a lot of users want to delete their content.

If we cannot enjoy the user-contributed content, XH should not make a profit from it.
Reply Show original comment Hide
Thank you guys, you saved my day (or perhaps better to say month which it would have taken to delete one by one)
Reply
why delete the uploaded vids and photos though? the ones i uploaded for pm can't be deleted anyway and im not in those..?
Reply
PPataquiva
to star1962-1 : Thanks a lot!
Reply Show original comment Hide
How can I delete all VIDEOS at once? Daily limit is 3 videos
Reply
star1962-1
to PPataquiva : the remove gallery is at the top when going in the edit gallery mode (in Mobile version)
Reply Show original comment Hide
PPataquiva
to star1962-1 : Hi! Thanks for the info. I just tested switching to mobile version and still I have to delete one picture at a time clicking on the trash icon at each picture. My script does not work in mobile version. :frowning:
Reply Show original comment Hide
PPataquiva
to Chvancus : Thanks a lot for your feedback on the script for deleting galleries. 
Reply Show original comment Hide
star1962-1
A friend gave me another way: Switch to "Mobile Version" (bottom of xhamster page). Then you can delete entire galleries from the edit gallery view #XHLeaveNothing
Reply
Chvancus
to Calamity-Janey : same here. sript does not work anymore.deleted manualy.
Reply Show original comment Hide
PPataquiva
Can I have some feedback from users that ran the script without issues, please?
Reply
PPataquiva
to paarrth : Yes, they will. Let's keep in touch!
Reply Show original comment Hide
PPataquiva
to Calamity-Janey : Please let me know if the error still shows when you run the script in the Edit Gallery tab. Thank you!
Reply Show original comment Hide
PPataquiva
to KymppiLasse : Hello. I just found that the error always show when you open the javascript gallery in a different tab.

Please make sure that you're opening the Javascript Console in the Edit Gallery tab (the url should start with https://xhamster.com/my/edit/photos/) and not the My Content tab (https://xhamster.com/my/photos) to avoid the error Uncaught TypeError: buttons_delete.click is not a function.
Reply Show original comment Hide
PPataquiva
to star1962-1 : Please make sure that you're opening the Javascript Console in the Edit Gallery tab (the url should start with https://xhamster.com/my/edit/photos/) and not the My Content tab (https://xhamster.com/my/photos) to avoid the error Uncaught TypeError: buttons_delete.click is not a function.
Reply Show original comment Hide
PPataquiva
to Calamity-Janey : Hello. Thanks for your report.

Please make sure that you're opening the Javascript Console in the Edit Gallery tab (the url should start with https://xhamster.com/my/edit/photos/) and not the My Content tab (https://xhamster.com/my/photos) to avoid the error Uncaught TypeError: buttons_delete.click is not a function.
Reply Show original comment Hide
Calamity-Janey
No luck 
Uncaught TypeError: buttons_delete.click is not a function
at <anonymous>:3:16
Reply
star1962-1
to KymppiLasse : I have this error too
Reply Show original comment Hide
Thanks a lot. Have a proper s  l e e p.

I tried with mac but no luck with that either.
Reply
PPataquiva
to KymppiLasse : You're welcome. I wish I could be more helpful given the current situation.

OK... I'm going to get some s l e e p... I can't think clearly anymore. :frowning:
Reply Show original comment Hide
PPataquiva
to KymppiLasse : Good! Please let me know if it works on your Mac. 
Reply Show original comment Hide
Thanks for your effort, I really appreciate it. 
Reply
I have also mac. I will try with that also
Reply
PPataquiva
to KymppiLasse : Let me get some s l e e p  as I've been working non-stop for the last 24 hours.  I will try to get back to you with an improved script.
Reply Show original comment Hide
PPataquiva
to KymppiLasse : I'm using Chrome on macOS. It should work the same on any Chrome derivative under Windows, Linux, and Mac. 
Reply Show original comment Hide