]> git.immae.eu Git - github/wallabag/wallabag.git/blame - app/Resources/static/themes/baggy/js/shortcuts/entry.js
Fixed entry shortcuts available in list view
[github/wallabag/wallabag.git] / app / Resources / static / themes / baggy / js / shortcuts / entry.js
CommitLineData
5637a26e
TC
1import Mousetrap from 'mousetrap';
2import $ from 'jquery';
3
0df2a4b0
NL
4$(document).ready(() => {
5 if ($('#article').length > 0) {
6 /* Article view */
7 Mousetrap.bind('o', () => {
8 $('div#article_toolbar ul.links a.original')[0].click();
9 });
16ef7607 10
0df2a4b0
NL
11 /* mark as favorite */
12 Mousetrap.bind('f', () => {
13 $('div#article_toolbar ul.links a.favorite')[0].click();
14 });
16ef7607 15
0df2a4b0
NL
16 /* mark as read */
17 Mousetrap.bind('a', () => {
18 $('div#article_toolbar ul.links a.markasread')[0].click();
19 });
16ef7607 20
0df2a4b0
NL
21 /* delete */
22 Mousetrap.bind('del', () => {
23 $('div#article_toolbar ul.links a.delete')[0].click();
24 });
25 }
16ef7607 26});