diff options
Diffstat (limited to 'app/Resources/static/themes/baggy')
-rwxr-xr-x | app/Resources/static/themes/baggy/js/init.js | 3 | ||||
-rw-r--r-- | app/Resources/static/themes/baggy/js/shortcuts/entry.js | 19 | ||||
-rw-r--r-- | app/Resources/static/themes/baggy/js/shortcuts/main.js | 0 |
3 files changed, 22 insertions, 0 deletions
diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js index b7347f7c..5a8911ad 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js | |||
@@ -1,4 +1,7 @@ | |||
1 | import $ from 'jquery'; | 1 | import $ from 'jquery'; |
2 | import { initFilters, initExport } from '../../_global/js/tools'; | ||
3 | import './shortcuts/main.js'; | ||
4 | import './shortcuts/entry.js'; | ||
2 | 5 | ||
3 | /* eslint-disable no-unused-vars */ | 6 | /* eslint-disable no-unused-vars */ |
4 | /* jquery has default scope */ | 7 | /* jquery has default scope */ |
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 @@ | |||
1 | /* Article view */ | ||
2 | Mousetrap.bind('o', () => { | ||
3 | $('div#article_toolbar ul.links li:nth-child(2) a')[0].click(); | ||
4 | }); | ||
5 | |||
6 | /* mark as favorite */ | ||
7 | Mousetrap.bind('s', () => { | ||
8 | $('div#article_toolbar ul.links li:nth-child(5) a')[0].click(); | ||
9 | }); | ||
10 | |||
11 | /* mark as read */ | ||
12 | Mousetrap.bind('a', () => { | ||
13 | $('div#article_toolbar ul.links li:nth-child(4) a')[0].click(); | ||
14 | }); | ||
15 | |||
16 | /* delete */ | ||
17 | Mousetrap.bind('del', () => { | ||
18 | $('div#article_toolbar ul.links li:nth-child(7) a')[0].click(); | ||
19 | }); | ||
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 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/shortcuts/main.js | |||