Google Reader - Mark Until Current As Read v 1.3

By Gautham Pai Last update Aug 14, 2009 — Installed 4,998 times. Daily Installs: 4, 6, 6, 5, 7, 1, 5, 10, 7, 11, 4, 8, 8, 5, 10, 9, 8, 9, 6, 9, 10, 15, 10, 10, 3, 29, 10, 9, 9, 6, 0

Archived Comments (locked)

Subscribe to Archived Comments 29 posts, 11 voices

Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
alala Scriptwright

Thanks Gautham for supplying the modified code. It works perfectly! I'm a happy man. Ha!

Congrats for getting your script featured in LH. It's great to know that more people will benefit from your script since it'll be included into LH's Better Google Reader Firefox extension. Btw, perhaps you want to use the CTRL-ALT hotkeys for your LH-version so that the it doesn't interfere with the email feature.

Once again, thanks for sharing such a great script with the rest of the world. Kudos! :)

 
Gautham Pai Script's Author

This script was recently featured on Lifehacker.

 
Gautham Pai Script's Author

Hi Alala,

I am not sure if people will like it so I am giving you the code to use the Ctrl and Alt modifiers. Please replace the existing keyPressEvent function in the script with this one:


function keyPressEvent(event){
var kcode = (event.keyCode)?event.keyCode:event.which;
var ctrlKeyPressed =event.ctrlKey;
var altKeyPressed =event.altKey;

var k = String.fromCharCode(kcode);

if(ctrlKeyPressed && altKeyPressed && (k == 'y' || k == 'Y')){
markUntilCurrentAsRead();
} else if(ctrlKeyPressed && altKeyPressed && (k == 'i' || k == 'I')){
markAfterCurrentAsRead();
}
}

You now have to press Ctrl+Alt+Y and Ctrl+Alt+I for the actions. I would have kept it simple with only Ctrl or Alt modifiers and not both, but unfortunately there are chances that this will clash with existing functions.

 
alala Scriptwright

Thanks Gautham for pointing to the code. However, that would only be changing the key and it doesn't allow the detection of CTRL or ALT.

Nonetheless, thanks. :)

 
Gautham Pai Script's Author

Hi Alala,

Right now there is no simple way to change it. But here is what you can do:

Right click the GM icon -> Go to Manage User Scripts...

Select the Google Reader - Mark Until Current As Read script and click on Edit.

Look for this section:


if(k == 'Y'){
markUntilCurrentAsRead();
} else if(k == 'I'){
markAfterCurrentAsRead();
}

Edit as required.

Thanks,
Gautham

 
alala Scriptwright

Shift Y and U interfere with the email composition. How do I change it to Ctrl Y and U instead? Or would you be changing it, or providing user customisation?

Thank you! :)

 
itairaz Scriptwright

Just what the doctor ordered!!

Thanks.

 
Sylvain Comte Scriptwright

cool script, could be very useful for big reading list. But the name of the script is not so good : your script doesn't mark as read, it does read the entries (by opening them all). It is slightly different, particularly if you are using trends (http://www.google.com/reader/view/?page=trends) to keep your reading lists up to date...

About AideRss compatibility, you might have noticed you don't have to disable AideRSS in GreaseMonkey : unchecking PostRank filtering is enough.d

 
alala Scriptwright

Thanks for the script. It works for me.

I've found out that if the PostRank Filtering of "AideRSS Google Reader Integration" Greasemonkey script is enabled, this script will not work. Fyi. :)

Btw, a suggestion... if you can mark them as read without having to open the item first, that'll be great. :)

 
Gautham Pai Script's Author

I just tried the latest script and it seems to work for me. I am using the same version of Opera. Can you verify that the script is still in the directory pointed to by "User Javascript files" option?

Thanks,
Gautham

 
Dapxin User

I use opera 9.52 and Shift+Y doesnt seem to do anything unlike before

Thx.

 
Gautham Pai Script's Author

Can you describe the problem and browser?

 
Dapxin User

This seems to have broken. Can anyone confirm pleasE ?

 
Gautham Pai Script's Author

Wow! This is cool. Thanks Dapxin.

I wasn't even aware that Opera has started supporting GM.

-Gautham

 
Dapxin User

thx! works and rocks in Opera 9.5

 
evaristor User

It works perfectly!
Thanks Gautham

 
Gautham Pai Script's Author

Aditya, evaristo:
Implemented your requests.

Thanks,
Gautham

 
Gautham Pai Script's Author

Hello Aditya,

Thanks.

The issue is not to get until the present item. The issue is to know if the present item was open or not when you pressed Shift + U so that we can return to the exact state.

Anyway, I will see if that can be done.

 
Aditya Banerjee Scriptwright

Thanks for the useful script. Just what I've been looking for.
It seems that the script marks the unread items as read and stops at the last unread item, rather than returning to the item that was selected earlier. Might be a bit tricky to implement, but it would be good to return to the item that was selected.

 
Gautham Pai Script's Author

Update: There are some bugs in Spencer's script. So you can use this script for now.

 
Gautham Pai Script's Author

Spencer Thiel has an updated script here:

http://userscripts.org/scripts/show/25522

 
evaristor User

#000000hA7: Thanks.

 
#000000hA7 User

evaristo: just sort items by oldest or newest (Folder settings...)

 
Spencer Thiel Scriptwright

Great script. I use list view to read items though and the current script pops open items to mark them as read.

I used a bit of this code to create a new script which will mark items as read without opening them first:
http://userscripts.org/scripts/show/25522

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel