diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-16 09:35:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 09:35:59 +0100 |
commit | e042a5d78fc7676eb399f61d199e8ec0045fbd1f (patch) | |
tree | 2bc79fda2ca07baf246a36543fd4419a7af7a7a8 /app/Resources/static/themes/baggy/js/shortcuts/entry.js | |
parent | 644b340178136ef9465fdc3cf40f1de0f5f8c3d3 (diff) | |
parent | 94f2057ffefdb164ae388a6971b4ed052082a434 (diff) | |
download | wallabag-e042a5d78fc7676eb399f61d199e8ec0045fbd1f.tar.gz wallabag-e042a5d78fc7676eb399f61d199e8ec0045fbd1f.tar.zst wallabag-e042a5d78fc7676eb399f61d199e8ec0045fbd1f.zip |
Merge pull request #2495 from wallabag/add-shortcuts
Added shortcuts
Diffstat (limited to 'app/Resources/static/themes/baggy/js/shortcuts/entry.js')
-rw-r--r-- | app/Resources/static/themes/baggy/js/shortcuts/entry.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/Resources/static/themes/baggy/js/shortcuts/entry.js b/app/Resources/static/themes/baggy/js/shortcuts/entry.js new file mode 100644 index 00000000..728df8bd --- /dev/null +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js | |||
@@ -0,0 +1,22 @@ | |||
1 | import Mousetrap from 'mousetrap'; | ||
2 | import $ from 'jquery'; | ||
3 | |||
4 | /* Article view */ | ||
5 | Mousetrap.bind('o', () => { | ||
6 | $('div#article_toolbar ul.links a.original')[0].click(); | ||
7 | }); | ||
8 | |||
9 | /* mark as favorite */ | ||
10 | Mousetrap.bind('s', () => { | ||
11 | $('div#article_toolbar ul.links a.favorite')[0].click(); | ||
12 | }); | ||
13 | |||
14 | /* mark as read */ | ||
15 | Mousetrap.bind('a', () => { | ||
16 | $('div#article_toolbar ul.links a.markasread')[0].click(); | ||
17 | }); | ||
18 | |||
19 | /* delete */ | ||
20 | Mousetrap.bind('del', () => { | ||
21 | $('div#article_toolbar ul.links a.delete')[0].click(); | ||
22 | }); | ||