swanson/stringer — pull request #80 by jefffederman (2013-05-12 05:58:53+00:00)
Title: Add n/p shortcuts (same behavior as in Google Reader)

Hey Matt,

Very nice work on Stringer, am thinking it could be my Google Reader replacement. Thought I'd add n/p shortcuts to complement the j/k shortcuts. I use them all the time in Reader and missed having them in Stringer.

As to what I changed:
• added Mousetrap bindings for the n/p shortcuts
• added an 'updateScroll' callback so that scroll only updates for n/p movements once article is above/beneath the viewport
• added https://github.com/teamdf/jquery-visible to help with the viewport code
• updated the locale files to include the n/p description (used Google Translate)
• updated the shortcuts partial to include the n/p description
• updated the layout to include the jquery-visible script

Specs are passing, though I didn't create any integration specs (or JS specs) for this branch. Browser tested in Chrome, Safari and IE8.

Best,
Jeff