diff --git a/src/main/resources/i18n/en.properties b/src/main/resources/i18n/en.properties index e90fe496..8a5d0bb5 100644 --- a/src/main/resources/i18n/en.properties +++ b/src/main/resources/i18n/en.properties @@ -109,6 +109,7 @@ about.shortcuts.focus_next_entry=set focus on next entry without opening it about.shortcuts.focus_previous_entry=set focus on previous entry without opening it about.shortcuts.open_close_current_entry=open/close current entry about.shortcuts.open_current_entry_in_new_window=open current entry in a new window +about.shortcuts.open_current_entry_in_new_window_background=open current entry in a new window in the background about.shortcuts.star_unstar=star/unstar current entry about.shortcuts.mark_current_entry=mark as read/unread current entry about.shortcuts.mark_all_as_read=mark all entries as read diff --git a/src/main/webapp/js/controllers.js b/src/main/webapp/js/controllers.js index 92181be1..f3d5437f 100644 --- a/src/main/webapp/js/controllers.js +++ b/src/main/webapp/js/controllers.js @@ -759,6 +759,19 @@ function($scope, $stateParams, $http, $route, $window, EntryService, SettingsSer window.open($scope.current.url); } }); + Mousetrap.bind('b', function(e) { + if ($scope.current) { + var url = $scope.current.url; + var a = document.createElement('a'); + a.href = url; + var evt = document + .createEvent('MouseEvents'); + evt.initMouseEvent('click', true, true, + window, 0, 0, 0, 0, 0, true, false, + false, false, 0, null); + a.dispatchEvent(evt); + } + }); Mousetrap.bind('s', function(e) { $scope.$apply(function() { if ($scope.current) { diff --git a/src/main/webapp/templates/_shortcuts.html b/src/main/webapp/templates/_shortcuts.html index 39611153..a69ba685 100644 --- a/src/main/webapp/templates/_shortcuts.html +++ b/src/main/webapp/templates/_shortcuts.html @@ -17,6 +17,9 @@
v
${about.shortcuts.open_current_entry_in_new_window}
+
b
+
${about.shortcuts.open_current_entry_in_new_window_background}
+
s
${about.shortcuts.star_unstar}