From 16ef7607f43ebc3e0134360b7657af191e14fe12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 2 Nov 2016 16:44:20 +0100 Subject: Reorganized JS folders for shortcuts --- .../static/themes/baggy/js/shortcuts/entry.js | 19 +++++++++++++++++++ .../static/themes/baggy/js/shortcuts/main.js | 0 2 files changed, 19 insertions(+) create mode 100644 app/Resources/static/themes/baggy/js/shortcuts/entry.js create mode 100644 app/Resources/static/themes/baggy/js/shortcuts/main.js (limited to 'app/Resources/static/themes/baggy/js/shortcuts') 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..d618f28e --- /dev/null +++ b/app/Resources/static/themes/baggy/js/shortcuts/entry.js @@ -0,0 +1,19 @@ +/* Article view */ +Mousetrap.bind('o', () => { + $('div#article_toolbar ul.links li:nth-child(2) a')[0].click(); +}); + +/* mark as favorite */ +Mousetrap.bind('s', () => { + $('div#article_toolbar ul.links li:nth-child(5) a')[0].click(); +}); + +/* mark as read */ +Mousetrap.bind('a', () => { + $('div#article_toolbar ul.links li:nth-child(4) a')[0].click(); +}); + +/* delete */ +Mousetrap.bind('del', () => { + $('div#article_toolbar ul.links li:nth-child(7) a')[0].click(); +}); diff --git a/app/Resources/static/themes/baggy/js/shortcuts/main.js b/app/Resources/static/themes/baggy/js/shortcuts/main.js new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3