forked from Archives/Athou_commafeed
shortcut to open link in background (fix #179)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
<dt>v</dt>
|
||||
<dd>${about.shortcuts.open_current_entry_in_new_window}</dd>
|
||||
|
||||
<dt>b</dt>
|
||||
<dd>${about.shortcuts.open_current_entry_in_new_window_background}</dd>
|
||||
|
||||
<dt>s</dt>
|
||||
<dd>${about.shortcuts.star_unstar}</dd>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user