From 2098509cb2ea986816e2acd5685c749dc9f02571 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 27 Jul 2015 22:01:19 +0200 Subject: add mark as read and next to keyboard shortcuts --- themes/_global/js/keyboard.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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) { case 77: markReadArticle(id); // m key letter break; + case 78: + markReadAndNextArticle(id); // n letter + break; } }, false); @@ -86,6 +89,12 @@ function markReadArticle(id) { } } +function markReadAndNextArticle(id) { + if (id) { + window.location = window.location.origin + window.location.pathname + '?action=archive_and_next&id=' + id; + } +} + function homeNavigation() { selectedArticle = $('.entrie:first'); window.addEventListener("keydown", function (event) { -- cgit v1.2.3