var global_unread = -1;
var active_title_text = "";
var current_subtitle = "";
-
+var daemon_enabled = false;
var _qfd_deleted_feed = 0;
+var firsttime_update = true;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
var f_document = window.frames["feeds-frame"].document;
parse_counters(reply, f_document, window);
-
- updateTitle("");
- notify("All feeds updated.");
+
+ if (!daemon_enabled) {
+ notify("All feeds updated.");
+ updateTitle("");
+ }
} catch (e) {
exception_error("refetch_callback", e);
updateTitle("");
function scheduleFeedUpdate(force) {
- notify("Updating feeds, please wait.");
-
-// document.title = "Tiny Tiny RSS - Updating...";
-
- updateTitle("Updating");
+ if (!daemon_enabled) {
+ notify("Updating feeds, please wait.");
+ updateTitle("Updating");
+ }
var query_str = "backend.php?op=rpc&subop=";
var omode;
- if (display_tags) {
- omode = "t";
+ if (firsttime_update) {
+ firsttime_update = false;
+ omode = "T";
} else {
- omode = "fl";
+ if (display_tags) {
+ omode = "t";
+ } else {
+ omode = "flc";
+ }
}
-
+
query_str = query_str + "&omode=" + omode;
+ query_str = query_str + "&uctr=" + global_unread;
+
if (xmlhttp_ready(xmlhttp)) {
xmlhttp.open("GET", query_str, true);
function localHotkeyHandler(keycode) {
-/* if (keycode == 78) {
- return moveToPost('next');
- }
-
- if (keycode == 80) {
- return moveToPost('prev');
- } */
-
if (keycode == 82) { // r
return scheduleFeedUpdate(true);
}
function updateTitle(s) {
var tmp = "Tiny Tiny RSS";
- if (s && s.length > 0) {
+ if (s != undefined) {
current_subtitle = s;
}
tmp = tmp + " (" + global_unread + ")";
}
- if (s) {
+ if (current_subtitle) {
tmp = tmp + " - " + current_subtitle;
}
try {
+ // this whole shebang is based on http://www.birnamdesigns.com/misc/busted2.html
+
+ if (arguments.callee.done) return;
+ arguments.callee.done = true;
+
disableContainerChildren("headlinesToolbar", true);
if (!genericSanityCheck())
dropboxSelect(viewbox, getCookie("ttrss_vf_vmode"));
dropboxSelect(limitbox, getCookie("ttrss_vf_limit"));
+
+ daemon_enabled = getCookie("ttrss_vf_daemon");
} catch (e) {
exception_error("init_second_stage", e);