summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js35
1 files changed, 8 insertions, 27 deletions
diff --git a/prefs.js b/prefs.js
index c000ca19b..04dd88c7e 100644
--- a/prefs.js
+++ b/prefs.js
@@ -448,7 +448,7 @@ function getSelectedFeedCats() {
}
-function readSelectedFeeds() {
+function readSelectedFeeds(read) {
if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
@@ -459,34 +459,15 @@ function readSelectedFeeds() {
if (sel_rows.length > 0) {
- notify("Marking selected feeds as read...");
-
- xmlhttp.open("GET", "backend.php?op=pref-rpc&subop=unread&ids="+
- param_escape(sel_rows.toString()), true);
- xmlhttp.onreadystatechange=notify_callback;
- xmlhttp.send(null);
-
- } else {
-
- notify("Please select some feeds first.");
-
- }
-}
-
-function unreadSelectedFeeds() {
-
- if (!xmlhttp_ready(xmlhttp)) {
- printLockingError();
- return
- }
-
- var sel_rows = getSelectedFeeds();
-
- if (sel_rows.length > 0) {
+ if (!read) {
+ op = "unread";
+ } else {
+ op = "read";
+ }
- notify("Marking selected feeds as unread...");
+ notify("Marking selected feeds as " + op + "...");
- xmlhttp.open("GET", "backend.php?op=pref-rpc&subop=unread&ids="+
+ xmlhttp.open("GET", "backend.php?op=pref-rpc&subop=" + op + "&ids="+
param_escape(sel_rows.toString()), true);
xmlhttp.onreadystatechange=notify_callback;
xmlhttp.send(null);