diff options
Diffstat (limited to 'js/build/app.js')
-rw-r--r-- | js/build/app.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/js/build/app.js b/js/build/app.js index 4fd50165c..b717aa923 100644 --- a/js/build/app.js +++ b/js/build/app.js @@ -1658,6 +1658,20 @@ app.service('SettingsResource', ["$http", "BASE_URL", function ($http, BASE_URL) ); }; + var reloadFeed = function (navigationArea) { + navigationArea.find('.active > a:visible').trigger('click'); + }; + + var nextFeed = function (navigationArea) { + navigationArea.find('.active') + .next('li').children('a:visible').trigger('click'); + }; + + var previousFeed = function (navigationArea) { + navigationArea.find('.active').prev('li') + .children('a:visible').trigger('click'); + }; + var onActiveItem = function (scrollArea, callback) { var items = scrollArea.find('.item'); @@ -1771,6 +1785,7 @@ app.service('SettingsResource', ["$http", "BASE_URL", function ($http, BASE_URL) if (noInputFocused($(':focus')) && noModifierKey(event)) { var keyCode = event.keyCode; var scrollArea = $('#app-content'); + var navigationArea = $('#app-navigation'); var isCompactMode = $('#app-content-wrapper > .compact').length > 0; // j, n, right arrow @@ -1816,6 +1831,24 @@ app.service('SettingsResource', ["$http", "BASE_URL", function ($http, BASE_URL) event.preventDefault(); openLink(scrollArea); + // r + } else if ([82].indexOf(keyCode) >= 0) { + + event.preventDefault(); + reloadFeed(navigationArea); + + // f + } else if ([70].indexOf(keyCode) >= 0) { + + event.preventDefault(); + nextFeed(navigationArea); + + // d + } else if ([68].indexOf(keyCode) >= 0) { + + event.preventDefault(); + previousFeed(navigationArea); + } } |