1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00
wallabag/assets/js/shortcuts/entry.js

27 lines
580 B
JavaScript
Raw Normal View History

import Mousetrap from 'mousetrap';
import $ from 'jquery';
$(document).ready(() => {
if ($('#article').length > 0) {
/* open original article */
Mousetrap.bind('o', () => {
2025-02-18 22:44:02 +01:00
$('ul.sidenav a.original i')[0].click();
});
2016-11-02 16:44:20 +01:00
/* mark as favorite */
Mousetrap.bind('f', () => {
2025-02-18 22:44:02 +01:00
$('ul.sidenav a.favorite i')[0].click();
});
2016-11-02 16:44:20 +01:00
/* mark as read */
Mousetrap.bind('a', () => {
2025-02-18 22:44:02 +01:00
$('ul.sidenav a.markasread i')[0].click();
});
2016-11-02 16:44:20 +01:00
/* delete */
Mousetrap.bind('del', () => {
2025-02-18 22:44:02 +01:00
$('ul.sidenav a.delete i')[0].click();
});
}
2016-11-02 16:44:20 +01:00
});