diff options
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r-- | js/tt-rss.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js index b97c052c1..d59ba495c 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -379,6 +379,11 @@ function init_second_stage() { console.log("second stage ok"); + if (getInitParam("simple_update")) { + console.log("scheduling simple feed updater..."); + window.setTimeout("update_random_feed()", 30*1000); + } + } catch (e) { exception_error("init_second_stage", e); } @@ -1033,3 +1038,19 @@ function switchPanelMode(wide) { exception_error("switchPanelMode", e); } } + +function update_random_feed() { + try { + console.log("in update_random_feed"); + + new Ajax.Request("backend.php", { + parameters: "op=rpc&method=updateRandomFeed", + onComplete: function(transport) { + handle_rpc_json(transport, true); + window.setTimeout("update_random_feed()", 30*1000); + } }); + + } catch (e) { + exception_error("update_random_feed", e); + } +} |