diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-07-27 22:01:19 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-07-27 22:01:19 +0200 |
commit | 2098509cb2ea986816e2acd5685c749dc9f02571 (patch) | |
tree | 80fc6e41129970648910533d25885da50bd67425 | |
parent | 6056aaf0769e59944b2d77a3b294f5098a731c3e (diff) | |
download | wallabag-2098509cb2ea986816e2acd5685c749dc9f02571.tar.gz wallabag-2098509cb2ea986816e2acd5685c749dc9f02571.tar.zst wallabag-2098509cb2ea986816e2acd5685c749dc9f02571.zip |
add mark as read and next to keyboard shortcuts
-rw-r--r-- | themes/_global/js/keyboard.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/themes/_global/js/keyboard.js b/themes/_global/js/keyboard.js index 48f60a09..04000f47 100644 --- a/themes/_global/js/keyboard.js +++ b/themes/_global/js/keyboard.js | |||
@@ -63,6 +63,9 @@ function actionArticle(id) { | |||
63 | case 77: | 63 | case 77: |
64 | markReadArticle(id); // m key letter | 64 | markReadArticle(id); // m key letter |
65 | break; | 65 | break; |
66 | case 78: | ||
67 | markReadAndNextArticle(id); // n letter | ||
68 | break; | ||
66 | } | 69 | } |
67 | 70 | ||
68 | }, false); | 71 | }, false); |
@@ -86,6 +89,12 @@ function markReadArticle(id) { | |||
86 | } | 89 | } |
87 | } | 90 | } |
88 | 91 | ||
92 | function markReadAndNextArticle(id) { | ||
93 | if (id) { | ||
94 | window.location = window.location.origin + window.location.pathname + '?action=archive_and_next&id=' + id; | ||
95 | } | ||
96 | } | ||
97 | |||
89 | function homeNavigation() { | 98 | function homeNavigation() { |
90 | selectedArticle = $('.entrie:first'); | 99 | selectedArticle = $('.entrie:first'); |
91 | window.addEventListener("keydown", function (event) { | 100 | window.addEventListener("keydown", function (event) { |