1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-22 17:18:37 +00:00

Added shortcuts

This commit is contained in:
Nicolas Lœuillet 2016-10-24 11:20:11 +02:00 committed by Thomas Citharel
parent 644b340178
commit 3cc78f0679
16 changed files with 121 additions and 6 deletions

View file

@ -1,4 +1,5 @@
const $ = require('jquery');
require('mousetrap');
/* Allows inline call qr-code call */
import jrQrcode from 'jr-qrcode'; // eslint-disable-line
@ -51,3 +52,14 @@ function initExport() {
}
export { savePercent, retrievePercent, initFilters, initExport };
/** Shortcuts **/
/* Go to */
Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') });
Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') });
/* Actions */
Mousetrap.bind('g a', function() {
$("#nav-btn-add").trigger("click");
});