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