Greasy Fork

kukudm 漫画左右键翻页

try to take over the world!

目前为 2018-11-18 提交的版本。查看 最新版本

// ==UserScript==
// @name         kukudm 漫画左右键翻页
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://comic.kukudm.com/*
// @match        http://comic2.kukudm.com/*
// @match        http://comic3.kukudm.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    document.onkeydown=function(event){
    var e = event || window.event || arguments.callee.caller.arguments[0];
        if(e && e.keyCode==39){ // 按右键
            document.getElementsByTagName('a')[1].click();
        }else if(e && e.keyCode==37){
            document.getElementsByTagName('a')[0].click();
        }
    }
})();