Created
March 27, 2015 14:19
-
-
Save imzhi/0e71f97090a7abb080ad to your computer and use it in GitHub Desktop.
风之动漫键盘翻页插件
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 风之动漫键盘翻页插件 | |
// @namespace http://your.homepage/ | |
// @version 0.1 | |
// @description 风之动漫键盘翻页插件,左右键控制漫画翻页 | |
// @author imzhi | |
// @match http://manhua.fzdm.com/* | |
// @grant none | |
// ==/UserScript== | |
$(function() { | |
$("body").keydown(function(evt) { | |
// 左 37 右 39 | |
var prev = $(".navigation").find(":contains('上一页')")[0]; | |
var next = $(".navigation").find(":contains('下一页')")[0]; | |
if (evt.keyCode==37 && prev) { | |
prev.click(); | |
} else if (evt.keyCode==39 && next) { | |
next.click() | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment