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/_global/js/shortcuts/main.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/_global/js/shortcuts/main.js')
-rw-r--r-- | app/Resources/static/themes/_global/js/shortcuts/main.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/Resources/static/themes/_global/js/shortcuts/main.js b/app/Resources/static/themes/_global/js/shortcuts/main.js new file mode 100644 index 00000000..ef6a1b84 --- /dev/null +++ b/app/Resources/static/themes/_global/js/shortcuts/main.js | |||
@@ -0,0 +1,15 @@ | |||
1 | import Mousetrap from 'mousetrap'; | ||
2 | |||
3 | /** Shortcuts **/ | ||
4 | |||
5 | /* Go to */ | ||
6 | Mousetrap.bind('g u', () => { window.location.href = Routing.generate('homepage'); }); | ||
7 | Mousetrap.bind('g s', () => { window.location.href = Routing.generate('starred'); }); | ||
8 | Mousetrap.bind('g r', () => { window.location.href = Routing.generate('archive'); }); | ||
9 | Mousetrap.bind('g a', () => { window.location.href = Routing.generate('all'); }); | ||
10 | Mousetrap.bind('g t', () => { window.location.href = Routing.generate('tag'); }); | ||
11 | Mousetrap.bind('g c', () => { window.location.href = Routing.generate('config'); }); | ||
12 | Mousetrap.bind('g i', () => { window.location.href = Routing.generate('import'); }); | ||
13 | Mousetrap.bind('g d', () => { window.location.href = Routing.generate('developer'); }); | ||
14 | Mousetrap.bind('?', () => { window.location.href = Routing.generate('howto'); }); | ||
15 | Mousetrap.bind('g l', () => { window.location.href = Routing.generate('logout'); }); | ||