-/*
- This program is Copyright (c) 2003-2005 Andrew Dolgov <cthulhoo@gmail.com>
- Licensed under GPL v.2 or (at your preference) any later version.
-*/
-
var xmlhttp = false;
var total_unread = 0;
var global_unread = 0;
+var active_title_text = "";
+
+var current_subtitle = "";
+
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
notify("refetch_callback: backend did not return valid XML");
return;
}
-
+
var reply = xmlhttp.responseXML.firstChild;
if (!reply) {
return;
}
+ var error_code = reply.getAttribute("error-code");
+
+ if (error_code && error_code != 0) {
+ return fatalError(error_code);
+ }
+
var f_document = window.frames["feeds-frame"].document;
for (var l = 0; l < reply.childNodes.length; l++) {
return;
}
- var error_code = reply.getAttribute("code");
+ var error_code = reply.getAttribute("error-code");
if (error_code && error_code != 0) {
return fatalError(error_code);
}
}
+/* wtf this is obsolete
function updateFeed(feed_id) {
var query_str = "backend.php?op=rpc&subop=updateFeed&feed=" + feed_id;
}
}
+*/
function scheduleFeedUpdate(force) {
// document.title = "Tiny Tiny RSS - Updating...";
- updateTitle("Updating...");
+ updateTitle("Updating");
var query_str = "backend.php?op=rpc&subop=";
feeds_frame.src = query_str;
global_unread = 0;
- updateTitle();
+ updateTitle("");
}
function updateTitle(s) {
var tmp = "Tiny Tiny RSS";
-
+
+ if (s && s.length > 0) {
+ current_subtitle = s;
+ }
+
if (global_unread > 0) {
tmp = tmp + " (" + global_unread + ")";
}
if (s) {
- tmp = tmp + " - " + s;
+ tmp = tmp + " - " + current_subtitle;
}
+
+ if (active_title_text.length > 0) {
+ tmp = tmp + " > " + active_title_text;
+ }
+
document.title = tmp;
}
return;
}
- if (opname == "Show only read") {
+ if (opname == "Show only unread") {
toggleDispRead();
return;
}
}
+function updateFeedTitle(t) {
+ active_title_text = t;
+ updateTitle();
+}
+
function toggleDispRead() {
var hide_read_feeds = (getCookie("ttrss_vf_hreadf") == 1);