]>
Commit | Line | Data |
---|---|---|
5637a26e TC |
1 | import Mousetrap from 'mousetrap'; |
2 | import $ from 'jquery'; | |
3 | ||
0df2a4b0 NL |
4 | $(document).ready(() => { |
5 | if ($('#article').length > 0) { | |
6 | /* open original article */ | |
7 | Mousetrap.bind('o', () => { | |
8 | $('ul.side-nav a.original i')[0].click(); | |
9 | }); | |
16ef7607 | 10 | |
0df2a4b0 NL |
11 | /* mark as favorite */ |
12 | Mousetrap.bind('f', () => { | |
13 | $('ul.side-nav a.favorite i')[0].click(); | |
14 | }); | |
16ef7607 | 15 | |
0df2a4b0 NL |
16 | /* mark as read */ |
17 | Mousetrap.bind('a', () => { | |
18 | $('ul.side-nav a.markasread i')[0].click(); | |
19 | }); | |
16ef7607 | 20 | |
0df2a4b0 NL |
21 | /* delete */ |
22 | Mousetrap.bind('del', () => { | |
23 | $('ul.side-nav a.delete i')[0].click(); | |
24 | }); | |
25 | } | |
16ef7607 | 26 | }); |