poulpette: (DW - Master - Awesomesauce)
poulpette ([personal profile] poulpette) wrote in [community profile] ao3some 2013-03-06 11:40 pm (UTC)

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;
	}
}

Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting