From 467f191a51345e79cdd9579b2778c34bb60779b5 Mon Sep 17 00:00:00 2001 From: doubleface Date: Fri, 14 Jun 2013 10:53:04 -0400 Subject: [PATCH] Automatic selection of the first element for mark as read --- assets/js/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/js/app.js b/assets/js/app.js index 3cca31c..2f9f075 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -230,6 +230,10 @@ function change_item_status() { + if (! document.getElementById("current-item")) { + document.querySelector("article").id = "current-item"; + } + var item = document.getElementById("current-item"); if (item) switch_status(item.getAttribute("data-item-id")); }