shortcut: open item.link

This commit is contained in:
Nazar Kanaev 2021-03-03 12:51:48 +00:00
parent af2a01eea2
commit e3820d1c8e
2 changed files with 10 additions and 0 deletions

View File

@ -432,6 +432,10 @@
<td><kbd>s</kbd></td>
<td>toggle an article as starred / unstarred</td>
</tr>
<tr>
<td><kbd>o</kbd></td>
<td>open an article's link</td>
</tr>
</table>
</div>
</div>

View File

@ -76,6 +76,11 @@ var helperFunctions = {
}
}
var shortcutFunctions = {
openItemLink: function() {
if (vm.itemSelectedDetails && vm.itemSelectedDetails.link) {
window.open(vm.itemSelectedDetails.link, '_blank')
}
},
toggleItemRead: function() {
if (vm.itemSelected != null) {
vm.toggleItemRead(vm.itemSelectedDetails)
@ -120,6 +125,7 @@ var shortcutFunctions = {
// If you edit, make sure you update the help modal
var keybindings = {
"o": shortcutFunctions.openItemLink,
"r": shortcutFunctions.toggleItemRead,
"R": shortcutFunctions.markAllRead,
"s": shortcutFunctions.toggleItemStarred,