Skip to content

Commit 8d93dfb

Browse files
committed
Added keyboard shortcut to add-feed
* Used the BIG_FREE_READER shortcut of 'a' to add-feed. * I only added the en.yml localization. * I didn't see any tests for shortcuts, so didn't add one.
1 parent 253717a commit 8d93dfb

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎app/views/partials/_action_bar.erb‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
if (refresh) refresh.click();
4040
});
4141

42+
Mousetrap.bind("a", function() {
43+
var add_feed = $("a#add-feed")[0];
44+
if (add_feed) add_feed.click();
45+
});
46+
4247
Mousetrap.bind("shift+a", function() {
4348
$("form#mark-all-as-read").submit();
4449
});

‎app/views/partials/_shortcuts.erb‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<li><kbd>s</kbd>: <%= t('partials.shortcuts.keys.s') %></li>
1313
<li><kbd>v</kbd>: <%= t('partials.shortcuts.keys.v') %></li>
1414
<li class="blank"></li>
15+
<li><kbd>a</kbd>: <%= t('partials.shortcuts.keys.a') %></li>
1516
<li><kbd>shift</kbd>+<kbd>a</kbd>: <%= t('partials.shortcuts.keys.shifta') %></li>
1617
<li><kbd>r</kbd>: <%= t('partials.shortcuts.keys.r') %></li>
1718
<li class="blank"></li>

‎config/locales/en.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ en:
9999
oenter: Toggle story open/closed
100100
or: or
101101
r: Refresh
102+
a: Add a feed
102103
shifta: Mark all as read
103104
v: Go to story URL
104105
left: Previous page

0 commit comments

Comments
 (0)