diff options
Diffstat (limited to 'app/Resources/static/themes/material/js/shortcuts/entry.js')
-rw-r--r-- | app/Resources/static/themes/material/js/shortcuts/entry.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/Resources/static/themes/material/js/shortcuts/entry.js b/app/Resources/static/themes/material/js/shortcuts/entry.js new file mode 100644 index 00000000..357c22fe --- /dev/null +++ b/app/Resources/static/themes/material/js/shortcuts/entry.js | |||
@@ -0,0 +1,22 @@ | |||
1 | import Mousetrap from 'mousetrap'; | ||
2 | import $ from 'jquery'; | ||
3 | |||
4 | /* open original article */ | ||
5 | Mousetrap.bind('o', () => { | ||
6 | $('ul.side-nav a.original i')[0].click(); | ||
7 | }); | ||
8 | |||
9 | /* mark as favorite */ | ||
10 | Mousetrap.bind('s', () => { | ||
11 | $('ul.side-nav a.favorite i')[0].click(); | ||
12 | }); | ||
13 | |||
14 | /* mark as read */ | ||
15 | Mousetrap.bind('a', () => { | ||
16 | $('ul.side-nav a.markasread i')[0].click(); | ||
17 | }); | ||
18 | |||
19 | /* delete */ | ||
20 | Mousetrap.bind('del', () => { | ||
21 | $('ul.side-nav a.delete i')[0].click(); | ||
22 | }); | ||