Skip to content

Instantly share code, notes, and snippets.

@june29
Last active December 14, 2015 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save june29/5159979 to your computer and use it in GitHub Desktop.
Save june29/5159979 to your computer and use it in GitHub Desktop.
LDR customizer just for june29
// ==UserScript==
// @id ldr29
// @name ldr29
// @version 1.0
// @namespace http://june29.jp/
// @author june29
// @description LDR customizer just for june29
// @include http://reader.livedoor.com/reader*
// @run-at document-end
// ==/UserScript==
window.addEventListener("load", function() {
with (unsafeWindow) {
Keybind.add("j", Control.go_next);
Keybind.add("k", Control.go_prev);
Keybind.add("p", function() {
Control.pin();
Control.go_next();
})
Keybind.add("o", function() {
var item = get_active_item(true);
if (!item) {
var pins = unsafeWindow.pin.pins;
for (var i = 0; i < pins.length; i++) {
var pin = pins[i];
setTimeout(function(url) {
GM_openInTab(url, true);
}, 0, pin.url);
}
unsafeWindow.pin.clear();
return;
}
setTimeout(function() {
GM_openInTab(item.link, true);
}, 0);
Control.go_next();
})
Keybind.remove("b");
Keybind.remove("i");
}
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment