Mercurial > dotfiles
changeset 243:ca28da5162f4
Hack Feedbin
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 06 Jan 2015 17:14:21 -0800 |
parents | 7f9afeff086f |
children | 79801ad6ed39 e74cfc5d3040 |
files | pentadactylrc |
diffstat | 1 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pentadactylrc Mon Jan 05 17:06:13 2015 -0800 +++ b/pentadactylrc Tue Jan 06 17:14:21 2015 -0800 @@ -62,4 +62,28 @@ set passkeys+=feedbin.com:hjklesmvVFcf123456789rgAa?<Space><Esc>,/ set passkeys+=groups.google.com:jkuonp +" Website-specific groups +" Feedbin +group! feedbin -loc feedbin.com +javascript <<EOF +function feedbinScrollUp() { + el = content.document.getElementsByClassName('entries'); + if (el != undefined && el.length > 0) { + el[0].scrollTop -= el[0].clientHeight/2; + } else { + content.console.error("Can't find the entries list. Got: ", el); + } +} +function feedbinScrollDown() { + el = content.document.getElementsByClassName('entries'); + if (el != undefined && el.length > 0) { + el[0].scrollTop += el[0].clientHeight/2; + } else { + content.console.error("Can't find the entries list. Got: ", el); + } +} +EOF +nmap -builtin -js <PageUp> feedbinScrollUp() +nmap -builtin -js <PageDown> feedbinScrollDown() + " vim: ft=vim