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