summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-07-25 08:48:15 +0100
committerAndrew Dolgov <[email protected]>2008-07-25 08:48:15 +0100
commit7bce63e76833eea0e1de4887cfad63127ca755c9 (patch)
tree001c31a4197fc515593a50faba7cd3fafe15969e /prefs.js
parentabaf02111e4dac9f1e36cc63d2aa324deae05f96 (diff)
add quick unsubscribe button to prefs/feedlist
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/prefs.js b/prefs.js
index c405a4f19..dd80aee4d 100644
--- a/prefs.js
+++ b/prefs.js
@@ -508,6 +508,7 @@ function editFeed(feed) {
xmlhttp.onreadystatechange=infobox_callback;
xmlhttp.send(null);
+ return false;
}
function editFeedCat(cat) {
@@ -691,6 +692,33 @@ function removeSelectedFeeds() {
return false;
}
+function removeFeed(id, title) {
+
+ if (!xmlhttp_ready(xmlhttp)) {
+ printLockingError();
+ return
+ }
+
+ if (id) {
+
+ var msg = __("Unsubscribe from %s?").replace("%s", title);
+
+ var ok = confirm(msg);
+
+ if (ok) {
+
+ notify_progress("Unsubscribing...");
+
+ xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=remove&ids="+
+ param_escape(id), true);
+ xmlhttp.onreadystatechange=feedlist_callback;
+ xmlhttp.send(null);
+ }
+ }
+
+ return false;
+}
+
function clearSelectedFeeds() {
if (!xmlhttp_ready(xmlhttp)) {