summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-01-22 19:49:47 +0400
committerAndrew Dolgov <[email protected]>2013-01-22 19:56:46 +0400
commit8b83bf5fa15cd0acf85d9d34a113ca6cecd3106b (patch)
tree5940748eeb25101a7edd9d4d5be3c91c6743cb08 /js
parent6addc13f46c29674bdf82986319f1aad8abf50cd (diff)
implement fallback _SIMPLE_UPDATE_MODE
Diffstat (limited to 'js')
-rw-r--r--js/tt-rss.js21
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);
+ }
+}