Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Open up browser console, for Chrome, hit F12 and copy-paste and enter this
$("a").filter(function(index){return $(this).text()==="unsave"}).click();setTimeout(function(){location.reload();},500);
Repeat until all items are unsaved.
@theg00s3

This comment has been minimized.

Copy link

@theg00s3 theg00s3 commented Sep 21, 2019

If used old.reddit.com use:
$("a").filter(function(index){return $(this).text()==="delete from saved"}).click();setTimeout(function(){location.reload();},500);

@lihuelworks

This comment has been minimized.

Copy link

@lihuelworks lihuelworks commented Feb 25, 2020

You should change that to "unsave", since that is the word it's used now for deleting saved posts. I pasted the command with the change:
$("a").filter(function(index){return $(this).text()==="unsave"}).click();setTimeout(function(){location.reload();},500);

@WozniakMac

This comment has been minimized.

Copy link

@WozniakMac WozniakMac commented Aug 28, 2020

Updated:
Run:

var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load

And

$("button").filter(function(index){return $(this).text()==="unsave"}).click();setTimeout(function(){location.reload();},500);

It could be improved to one script but I'm fine with it like this

@rlewkowicz

This comment has been minimized.

Copy link

@rlewkowicz rlewkowicz commented Sep 11, 2020

Grease monkey script to do the same on old interface

// ==UserScript==
// @name     Unnamed Script 400702
// @version  1
// @require     http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @include *reddit*user*
// @grant unsafeWindow
// ==/UserScript==


window.addEventListener('load', function() {
  setInterval ( function () {
    var clickEvent  = document.createEvent ("HTMLEvents");
    clickEvent.initEvent ("click", true, true);

    $("a:contains('unsave')")[0].dispatchEvent (clickEvent);
  }, 40);
  setTimeout(function(){location.reload();},5000);
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.