Unsave All Reddit Posts

I had a lot of saved posts built up in my Reddit account so I thought I would do a little house cleaning. Mainly by unsaving all the saved posts. Probably best to just get rid of them all and then try to only keep a list of the stuff I actually wanted, deleting stuff as I go. I had hundreds of saved posts, and going through them manually was taking way too long. So I came up with a little GreaseMonkey script to get rid of all the saved posts.  Here it is:

window.addEventListener("load", function(evt) {
var btn = document.createElement('input');
btn.value= 'Unsave All'


document.body.insertBefore(btn, document.body.firstChild);

function gm_UnsaveAll(evt) {
$('.link-unsave-button a').each(function(i,e){setTimeout(function(){e.click();},1000)});

Set it up in GreaseMonkey with https://www.reddit.com/user/{USERNAME}/saved as the included page and you’re ready to go. Just navigate to that page and you should see a button at the top of the page. Don’t forget to replace {USERNAME} with your username. It only unsaves a single page at a time, but it’s better than clicking each post individually. And if you have Reddit Enhancement Suite (AKA RES) installed, then you can scroll down to load up a few pages worth of posts and unsave them all at once. This saved me quite a bit of time, and I now have a clean saved posts list, ready to be filled up again.