diff options
Diffstat (limited to 'themes/_global/js')
-rw-r--r-- | themes/_global/js/keyboard.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/themes/_global/js/keyboard.js b/themes/_global/js/keyboard.js index 4469248d..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) { |
@@ -144,5 +153,7 @@ function goSelectPrev(selectedArticle,number) { | |||
144 | } | 153 | } |
145 | 154 | ||
146 | function enterArticle(selectedArticle) { | 155 | function enterArticle(selectedArticle) { |
147 | window.location = selectedArticle.find('a:first').attr('href'); | 156 | if (!$("#bagit").hasClass("current")) { |
157 | window.location = selectedArticle.find('a:first').attr('href'); | ||
158 | } | ||
148 | } \ No newline at end of file | 159 | } \ No newline at end of file |