hotkey s stars/unstars selected article
This commit is contained in:
parent
76684fc7f4
commit
9932fb068b
3 changed files with 11 additions and 12 deletions
1
README
1
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:
|
||||
|
||||
|
|
|
@ -1133,10 +1133,10 @@
|
|||
|
||||
if ($line["marked"] == "t" || $line["marked"] == "1") {
|
||||
$marked_pic = "<img id=\"FMARKPIC-$id\" src=\"images/mark_set.png\"
|
||||
alt=\"Reset mark\" onclick='javascript:toggleMark($id, false)'>";
|
||||
alt=\"Reset mark\" onclick='javascript:toggleMark($id)'>";
|
||||
} else {
|
||||
$marked_pic = "<img id=\"FMARKPIC-$id\" src=\"images/mark_unset.png\"
|
||||
alt=\"Set mark\" onclick='javascript:toggleMark($id, true)'>";
|
||||
alt=\"Set mark\" onclick='javascript:toggleMark($id)'>";
|
||||
}
|
||||
|
||||
$content_link = "<a href=\"javascript:view($id,$feed_id);\">" .
|
||||
|
|
18
viewfeed.js
18
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);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue