Wednesday, June 27, 2012

How unstar all Google Reader starred items

 

UPDATE (08/27/2012): I created a custom Google Chrome extension that allows you to unstar all items without having to run any JavaScript!  Read more about it here: Unstar All Google Reader™ Starred Items with my new Chrome™ Extension


I’ve been starring Google Reader items for years and noticed yesterday that I had thousands of them starred…some from 2010…I’m never going to read those posts and want start with a clean starred items page.  Google Reader doesn’t have an “unstar all” feature.  So instead of clicking thousands of times, I wrote a little JavaScript to do that for me.  Hope it saves you some time as well.

1. Go to Google Reader and click on the “Starred Items” navigation item in the left column.

image

2. Make sure all your starred items have been fetched from the server. You can load all items by scrolling all the way down to the bottom of the page or by hitting the “End” key on your keyboard.  When you get to the bottom of the page you’ll see a little loading icon in the lower right hand corner that looks like this:

imageimage

Repeat the scrolling until all items appear – you won’t see the loading icon anymore when all items have been loaded.  We do this so all items are in the DOM and we can then act upon them with JavaScript.  (I might think about scripting this someday, but I don’t have time right now) Once you have scrolled all items into view then you can move on step 3.

3. Copy the “Unstar All” script below into the Console tab of your browsers development tools and hit enter or hit the Run script button (depending on your browser, detailed instructions for each browser are below).

var x = document.getElementsByClassName('entry-icons'); for(var i=0;i<x.length;i++)x[i].firstChild.click();
image

4. After you execute the script all of the star icons will be grey. Refresh the page by holding down CTRL and clicking on the refresh button or close your browser and reopen to clear the cache.


image


5. After you refresh your page you won’t have any starred items.  If you still do then you didn’t have all the starred items downloaded to the page.  See step 2 above and execute the script again.


image


 


Detailed Instructions


IE9



1. Hit F12


2. Click on the Console Tab


image


3. Copy the script above into the input box.


image


4. Click the Run Script button.


image


Google Chrome



1. Hit F12


2. Click on the Console Tab


image


3. Copy the script above into the input box.


image


4. Hit Enter.


 


FireFox



1. Hit CTRL+SHFT+K or select Web Developer –> Web Console from the main menu.


image


3. Copy the script above into the input box.


image


4. Hit Enter.


 


 


The script in this post may (but probably won’t) have side effects on your browser, machine, mind, etc.  I’m in no way responsible for any damage this script causes to you or your loved ones.  Use at your own risk.