diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-24 11:20:11 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2016-11-15 21:54:20 +0100 |
commit | 3cc78f06799b0c91957767e8d9255e67b30edd96 (patch) | |
tree | 88aca51a22f8c7ec9a2894b689732be571111e3a /app/Resources | |
parent | 644b340178136ef9465fdc3cf40f1de0f5f8c3d3 (diff) | |
download | wallabag-3cc78f06799b0c91957767e8d9255e67b30edd96.tar.gz wallabag-3cc78f06799b0c91957767e8d9255e67b30edd96.tar.zst wallabag-3cc78f06799b0c91957767e8d9255e67b30edd96.zip |
Added shortcuts
Diffstat (limited to 'app/Resources')
-rw-r--r-- | app/Resources/static/themes/_global/js/tools.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Resources/static/themes/_global/js/tools.js b/app/Resources/static/themes/_global/js/tools.js index 55de090c..9a98f0a6 100644 --- a/app/Resources/static/themes/_global/js/tools.js +++ b/app/Resources/static/themes/_global/js/tools.js | |||
@@ -1,4 +1,5 @@ | |||
1 | const $ = require('jquery'); | 1 | const $ = require('jquery'); |
2 | require('mousetrap'); | ||
2 | 3 | ||
3 | /* Allows inline call qr-code call */ | 4 | /* Allows inline call qr-code call */ |
4 | import jrQrcode from 'jr-qrcode'; // eslint-disable-line | 5 | import jrQrcode from 'jr-qrcode'; // eslint-disable-line |
@@ -51,3 +52,14 @@ function initExport() { | |||
51 | } | 52 | } |
52 | 53 | ||
53 | export { savePercent, retrievePercent, initFilters, initExport }; | 54 | export { savePercent, retrievePercent, initFilters, initExport }; |
55 | |||
56 | /** Shortcuts **/ | ||
57 | |||
58 | /* Go to */ | ||
59 | Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') }); | ||
60 | Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') }); | ||
61 | |||
62 | /* Actions */ | ||
63 | Mousetrap.bind('g a', function() { | ||
64 | $("#nav-btn-add").trigger("click"); | ||
65 | }); | ||