1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 13:35:56 +00:00

implement fallback _SIMPLE_UPDATE_MODE

This commit is contained in:
Andrew Dolgov
2013-01-22 19:49:47 +04:00
parent 6addc13f46
commit 8b83bf5fa1
3 changed files with 94 additions and 0 deletions

View File

@@ -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);
}
}