]> git.wh0rd.org - tt-rss.git/commitdiff
catchupFeed: add confirmation prompt
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 11 Nov 2011 11:35:29 +0000 (15:35 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 11 Nov 2011 11:35:29 +0000 (15:35 +0400)
feedlist.js

index dacef5c22b7bdd4b7b3093efb994adbf443cbab5..833fe9e26ae4173525249a7c6c78eb277b5cae46 100644 (file)
@@ -459,6 +459,14 @@ function getNextUnreadFeed(feed, is_cat) {
 
 function catchupFeed(feed, is_cat) {
        try {
+               var str = __("Mark all articles in %s as read?");
+               var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
+
+               str = str.replace("%s", fn);
+
+               if (getInitParam("confirm_feed_catchup") == 1 && !confirm(str)) {
+                       return;
+               }
 
                var catchup_query = "?op=rpc&subop=catchupFeed&feed_id=" +
                        feed + "&is_cat=" + is_cat;