Skip to content

Instantly share code, notes, and snippets.

@basyura
Created July 29, 2011 04:07
Show Gist options
  • Save basyura/1113110 to your computer and use it in GitHub Desktop.
Save basyura/1113110 to your computer and use it in GitHub Desktop.
livedoor reader - key change
// ==UserScript==
// @name ldr_key
// @namespace basyura.org
// @include http://reader.livedoor.com/reader/*
// ==/UserScript==
(function(){
var w = unsafeWindow;
var _onload = w.onload;
var onload = function() { with(w) {
Keybind.add("j" , function() {
var container = document.getElementById("right_container");
if (container.scrollTop == 0) {
Control.scroll_next_item();
}
else {
Control.scroll_next_page();
}
});
Keybind.add("k" , Control.scroll_prev_page);
Keybind.add("d" , Control.scroll_next_item);
}}
w.onload = function(){
_onload();
onload();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment