On Thu, Jun 5, 2014 at 7:55 PM, Pau Giner pginer@wikimedia.org wrote:
What exactly should that snippet do?
When the panel is closed and the user presses either "up" or "down" keys, open the panel.
var oldLoadViewer = mw.mmv.bootstrap.loadViewer; mw.mmv.bootstrap.loadViewer = function() { return oldLoadViewer.apply( this, arguments ).done( function() { mw.mmv.bootstrap.viewer.ui.panel.scroller.keydown = function() { mw.mmv.bootstrap.viewer.ui.panel.scroller.toggle(); }; } ); };
This makes both the up and down keys toggle open/closed state.