next previous arrows for tutorials point

maps the next and previous buttons to the right and left arrow keys for tutorialspoint.com

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        next previous arrows for tutorials point
// @namespace   keyboard
// @description maps the next and previous buttons to the right and left arrow keys for tutorialspoint.com
// @include     https://www.tutorialspoint.com/*
// @include     http://www.tutorialspoint.com/*
// @version     1
// @grant       none
// ==/UserScript==
function leftArrowPressed() {
   document.getElementsByClassName("pre-btn")[0].getElementsByTagName("a")[0].click();
}

function rightArrowPressed() {
    document.getElementsByClassName("nxt-btn")[0].getElementsByTagName("a")[0].click();
}

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