aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static/themes/_global/js/tools.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/Resources/static/themes/_global/js/tools.js')
-rw-r--r--app/Resources/static/themes/_global/js/tools.js12
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 @@
1const $ = require('jquery'); 1const $ = require('jquery');
2require('mousetrap');
2 3
3/* Allows inline call qr-code call */ 4/* Allows inline call qr-code call */
4import jrQrcode from 'jr-qrcode'; // eslint-disable-line 5import jrQrcode from 'jr-qrcode'; // eslint-disable-line
@@ -51,3 +52,14 @@ function initExport() {
51} 52}
52 53
53export { savePercent, retrievePercent, initFilters, initExport }; 54export { savePercent, retrievePercent, initFilters, initExport };
55
56/** Shortcuts **/
57
58/* Go to */
59Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') });
60Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') });
61
62/* Actions */
63Mousetrap.bind('g a', function() {
64 $("#nav-btn-add").trigger("click");
65});