diff --git a/README b/README
index 01bb0d26b..2dac46a94 100644
--- a/README
+++ b/README
@@ -34,6 +34,7 @@ Interface:
"a" hides or shows only unread feeds in the feedlist;
"j" move to previous feed
"k" move to next feed
+ "s" star/unstar selected article
Requirements:
diff --git a/backend.php b/backend.php
index 9307f78ad..6969b3783 100644
--- a/backend.php
+++ b/backend.php
@@ -1133,10 +1133,10 @@
if ($line["marked"] == "t" || $line["marked"] == "1") {
$marked_pic = "";
+ alt=\"Reset mark\" onclick='javascript:toggleMark($id)'>";
} else {
$marked_pic = "";
+ alt=\"Set mark\" onclick='javascript:toggleMark($id)'>";
}
$content_link = "" .
diff --git a/viewfeed.js b/viewfeed.js
index 4aa7f4f5e..0dae392df 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -77,13 +77,7 @@ function view(id, feed_id) {
}
-function rowToggleMark(row) {
-
-
-
-}
-
-function toggleMark(id, toggle) {
+function toggleMark(id) {
var f_document = parent.frames["feeds-frame"].document;
@@ -100,10 +94,10 @@ function toggleMark(id, toggle) {
// alert(vfeedu);
- if (toggle == true) {
+ if (mark_img.alt != "Reset mark") {
mark_img.src = "images/mark_set.png";
mark_img.alt = "Reset mark";
- mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+', false)');
+ mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+')');
query = query + "&mark=1";
if (vfeedu && crow.className.match("Unread")) {
@@ -113,7 +107,7 @@ function toggleMark(id, toggle) {
} else {
mark_img.src = "images/mark_unset.png";
mark_img.alt = "Set mark";
- mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+', true)');
+ mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+')');
query = query + "&mark=0";
if (vfeedu && crow.className.match("Unread")) {
@@ -224,6 +218,10 @@ function localHotkeyHandler(keycode) {
// return viewfeed(active_feed_id, active_offset, "ForceUpdate");
// }
+ if (keycode == 83) { // s
+ if (active_post_id) toggleMark(active_post_id);
+ }
+
// alert("KC: " + keycode);
}