+ if (xmlhttp_view.readyState == 4) {
+ container.innerHTML=xmlhttp_view.responseText;
+ markHeadline(active_post_id);
+ }
+}
+
+function refetch_callback() {
+
+ if (xmlhttp_rpc.readyState == 4) {
+ notify("All feeds updated");
+ var container = document.getElementById('feeds');
+ container.innerHTML = xmlhttp_rpc.responseText;
+ document.title = "Tiny Tiny RSS";
+ }
+}
+
+function scheduleFeedUpdate(force) {
+
+ notify("Updating feeds in background...");
+
+ document.title = "Tiny Tiny RSS - Updating...";
+
+ var query_str = "backend.php?op=rpc&subop=";
+
+ if (force) {
+ query_str = query_str + "forceUpdateAllFeeds";
+ } else {
+ query_str = query_str + "updateAllFeeds";
+ }
+
+ if (xmlhttp_ready(xmlhttp_rpc)) {
+ xmlhttp_rpc.open("GET", query_str, true);
+ xmlhttp_rpc.onreadystatechange=refetch_callback;
+ xmlhttp_rpc.send(null);
+ } else {
+ printLockingError();
+ }
+}
+
+function updateFeedList(silent, fetch) {
+
+ if (silent != true) {
+ notify("Loading feed list...");
+ }
+
+ var query_str = "backend.php?op=feeds";
+
+ if (fetch) query_str = query_str + "&fetch=yes";
+
+ if (xmlhttp_ready(xmlhttp)) {
+ xmlhttp.open("GET", query_str, true);
+ xmlhttp.onreadystatechange=feedlist_callback;
+ xmlhttp.send(null);
+ } else {
+ printLockingError();