Questionable Content Navigation Improvements

Adds arrow keys control.

As of 02. 06. 2014. See the latest version.

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        Questionable Content Navigation Improvements
// @namespace   http://userscripts.org/users/Scuzzball
// @description Adds arrow keys control.
// @include     http://questionablecontent.net/view.php?comic=*
// @grant       none
// @version     1.0
// ==/UserScript==




function leftArrowPressed() {
	window.location = document.getElementById('comicnav').children[1].children[0].href;
}

function rightArrowPressed() {
	window.location = document.getElementById('comicnav').children[2].children[0].href;
}

document.onkeydown = function(evt) {
    evt = evt || window.event;
    switch (evt.keyCode) {
        case 37:
            leftArrowPressed();
            break;
        case 39:
            rightArrowPressed();
            break;
    }
};