Greasy Fork

AO3-navigate-arrows

right arrow to next chapter

目前为 2017-07-01 提交的版本。查看 最新版本

// ==UserScript==
// @name         AO3-navigate-arrows
// @namespace    a03-navigate-arrows
// @version      0.1
// @description  right arrow to next chapter
// @author       ecool
// @match        http://archiveofourown.org/works/*/chapters/*
// @require      http://code.jquery.com/jquery-latest.js
// @grant        none
// ==/UserScript==

(function($) {
    'use strict';
    $('html').keydown(function (e) {
        if(e.keyCode == 37) {
            location.href = $('li.chapter.previous').children('a').attr('href');
        }
        if(e.keyCode == 39) {
            location.href = $('li.chapter.next').children('a').attr('href');
        }
    });
})(jQuery);