G.E/EX Navigate Gallery Thumbnails

Navigate through pages of in-gallery thumbnails with shortcuts.

La data de 26-02-2015. Vezi ultima versiune.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        G.E/EX Navigate Gallery Thumbnails
// @description Navigate through pages of in-gallery thumbnails with shortcuts.
// @author      Hen-Tie
// @homepage	http://hen-tie.tumblr.com/
// @namespace   https://greasyfork.org/en/users/8336
// @include	http://g.e-hentai.org/g/*
// @include	http://exhentai.org/g/*
// @include	https://g.e-hentai.org/g/*
// @include	https://exhentai.org/g/*
// @grant	GM_getValue
// @grant	GM_setValue
// @run-at 	document-start
// @require	http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
// @icon        https://i.imgur.com/RPv1X1r.png
// @version	1.0
// ==/UserScript==
$(document).keydown(function(e){
    if (e.keyCode == 37) { 
       $('table.ptt td:first-child a').click();
    }
    if (e.keyCode == 68) { 
       $('table.ptt td:last-child a').click();
    }
    if (e.keyCode == 65) { 
       $('table.ptt td:first-child a').click();
    }
    else if (e.keyCode == 39) { 
       $('table.ptt td:last-child a').click();
    }
});