theaeblackthorn: (Suits - Harvey - Good Boy)
theaeblackthorn ([personal profile] theaeblackthorn) wrote in [community profile] ao3some2013-03-06 03:32 pm

AO3 Navigation Tweaks

Hi all,

I made a greasemonkey script for AO3 that has some handy shortcuts in it.


Essentially this is just me sharing with the rest of the internet something I made to make my ao3 reading easier.

With this script:

- when viewing the works page in AO3, left arrow goes back a page in the pagination, right arrow goes forward a page, like tumblr's navigation.
- when viewing an individual work in AO3, left arrow goes to the next chapter, right to the previous chapter
- when on a work pressing the following keys causes the following behaviour:
-- 'd': downloads the .mobi version of the fic
-- 'k': leaves kudos
-- 'm': marks it for later
-- 's': subscribes
-- '#': sets the filters to 'english' and 'completed works only'*

Like I said, not comprehensive, just something I made to make my reading experience lazier and I thought other people might like as well.

(*pretty tailored to me, but I've left it in there incase someone else wants to use it)

It'd be great to hear if anyone else finds it helpful :)
poulpette: (DW - Master - Awesomesauce)

[personal profile] poulpette 2013-03-06 11:40 pm (UTC)(link)
Do you like virtual baked goods? 'cause I'd be happy to send you tons of them :D

I'll need to make some edits to suit my use, but I've longed for a script like that for a while now. Thank you for sharing this :D

ETA 1: After testing, sadly, only the left/right arrow keypresses work for me. Probably due to the fact that I have a french AZERTY keyboard. I'll investigate.

ETA2: I've managed to get everything but the download part working by replacing the keydown function by its keypress counterpart.

ETA3: Managed to make the download work & to allow some flexibility for the download format. I'll add what I modified below in case it is of use to someone else.

if(e.which == 100 ) //if 'd' hit, download the work under specified format
{
	var dlformat = 1;
	// Download format:
		// 0: mobi 
		// 1: epub 
		// 2: pdf 
		// 3: html 
	
	var location = jQuery('#downloads li a').eq(dlformat).attr('href');
	if (location!=null)
	{
		window.location.href = location;
	}
}
Edited 2013-03-07 02:03 (UTC)
poulpette: cropped picture of an illustrated octopus (Default)

[personal profile] poulpette 2013-03-07 03:23 am (UTC)(link)
Oh, I should have included that info as well *facepalm* So sorry! I'm using a win7/FF(latest beta) combo.

From what I've read on keypress/keydown, keypress only guarantees character keys, not the arrows key. Maybe if you separated the arrow keypress to a different function? Keep keypress for the char keys and keydown for the rest? *shrugs*
isweedan: White jittering text "art is the weapon" on red field (Default)

[personal profile] isweedan 2013-03-15 02:17 am (UTC)(link)
HELPFUL LIKE A HELPING THING! \o/ &epub;