aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static/themes/baggy/js/shortcuts/entry.js
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-11-16 09:35:59 +0100
committerGitHub <noreply@github.com>2016-11-16 09:35:59 +0100
commite042a5d78fc7676eb399f61d199e8ec0045fbd1f (patch)
tree2bc79fda2ca07baf246a36543fd4419a7af7a7a8 /app/Resources/static/themes/baggy/js/shortcuts/entry.js
parent644b340178136ef9465fdc3cf40f1de0f5f8c3d3 (diff)
parent94f2057ffefdb164ae388a6971b4ed052082a434 (diff)
downloadwallabag-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.js22
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 @@
1import Mousetrap from 'mousetrap';
2import $ from 'jquery';
3
4/* Article view */
5Mousetrap.bind('o', () => {
6 $('div#article_toolbar ul.links a.original')[0].click();
7});
8
9/* mark as favorite */
10Mousetrap.bind('s', () => {
11 $('div#article_toolbar ul.links a.favorite')[0].click();
12});
13
14/* mark as read */
15Mousetrap.bind('a', () => {
16 $('div#article_toolbar ul.links a.markasread')[0].click();
17});
18
19/* delete */
20Mousetrap.bind('del', () => {
21 $('div#article_toolbar ul.links a.delete')[0].click();
22});