summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-08-24 05:49:57 +0100
committerAndrew Dolgov <[email protected]>2007-08-24 05:49:57 +0100
commit0df398da2c83693646605c91f29670405da2d22f (patch)
tree2a28d04fe765e6eef7d187811c9abfe22be48277 /tt-rss.js
parent6b8bbd1dae40d483543d452dd3e6109338d9c24f (diff)
code cleanups, make feedlist_callback async
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js37
1 files changed, 8 insertions, 29 deletions
diff --git a/tt-rss.js b/tt-rss.js
index 6a0ae0f9f..3a134d613 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -219,14 +219,10 @@ function updateFeedList(silent, fetch) {
debug("updateFeedList Q=" + query_str);
- if (xmlhttp_ready(xmlhttp)) {
- xmlhttp.open("GET", query_str, true);
- xmlhttp.onreadystatechange=feedlist_callback;
- xmlhttp.send(null);
- } else {
- debug("xmlhttp busy");
- //printLockingError();
- }
+ new Ajax.Request(query_str, {
+ onComplete: function(transport) {
+ feedlist_callback2(transport);
+ } });
}
@@ -238,14 +234,10 @@ function catchupAllFeeds() {
debug("catchupAllFeeds Q=" + query_str);
- if (xmlhttp_ready(xmlhttp)) {
- xmlhttp.open("GET", query_str, true);
- xmlhttp.onreadystatechange=feedlist_callback;
- xmlhttp.send(null);
- } else {
- debug("xmlhttp busy");
- //printLockingError();
- }
+ new Ajax.Request(query_str, {
+ onComplete: function(transport) {
+ feedlist_callback2(transport);
+ } });
global_unread = 0;
updateTitle("");
@@ -297,19 +289,6 @@ function search() {
viewCurrentFeed(0, "");
}
-function localPiggieFunction(enable) {
- if (enable) {
- var query_str = "backend.php?op=feeds&subop=piggie";
-
- if (xmlhttp_ready(xmlhttp)) {
-
- xmlhttp.open("GET", query_str, true);
- xmlhttp.onreadystatechange=feedlist_callback;
- xmlhttp.send(null);
- }
- }
-}
-
// if argument is undefined, current subtitle is not updated
// use blank string to clear subtitle
function updateTitle(s) {