Last active
March 11, 2022 21:31
-
-
Save Dinir/ff1efabb2da515cec25d0a2110005d43 to your computer and use it in GitHub Desktop.
mass delete Steam screenshots on your profile
This file contains 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
/* | |
Go to your screenshot page, set view as Image Wall, | |
press F12, then go to console to paste this code. | |
The browser tab should be visible on the monitor. | |
I highly recommend moving them to a corner where you can't see | |
the screenshots as the page scrolls, as you won't see them ever again. | |
When the page eventually refreshes and says an error occured, | |
keep the page open until you see no more number changes on your profile. | |
*/ | |
(theNumber => { | |
// get total number of screenshots displayed | |
const getTrackedNumber = () => | |
document.getElementsByClassName('profile_media_item').length | |
// scroll down the page every second until the number hit | |
const keepScrollingDown = setInterval(() => { | |
window.scrollTo(0, document.body.scrollHeight) | |
stopIfNumberHit(theNumber) | |
}, 1000) | |
/* | |
check if the total number of screenshots reached certain number, | |
then if it did, select all of them and confirm deleting them. | |
*/ | |
const stopIfNumberHit = n => { | |
if (getTrackedNumber() < n) | |
return false | |
clearInterval(keepScrollingDown) | |
ToggleManagementMode() | |
SelectAllScreenshots() | |
ConfirmBatchAction('delete') | |
$('BatchScreenshotManagement').submit() | |
} | |
})(1000) // set the number here. usually it stops after around 800. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment