var hotkeys_enabled = true;
-var xmlhttp_rpc = Ajax.getTransport();
var notify_silent = false;
var last_progress_point = 0;
var async_counters_work = false;
hotkeys_enabled = true;
}
-function xmlhttp_ready(obj) {
- return obj.readyState == 4 || obj.readyState == 0 || !obj.readyState;
-}
-
function open_article_callback(transport) {
try {
debug("Subscribed feed number changed, refreshing feedlist");
setTimeout('updateFeedList(false, false)', 50);
}
+ } else {
+/* var fl = document.getElementById("feeds-frame").innerHTML;
+ if (fl) {
+ cache_invalidate("FEEDLIST");
+ cache_inject("FEEDLIST", fl, getInitParam("num_feeds"));
+ } */
}
} catch (e) {
function all_counters_callback2(transport, async_call) {
try {
if (async_call) async_counters_work = true;
+
+ if (offline_mode) return;
debug("<b>all_counters_callback2 IN: " + transport + "</b>");
parse_counters_reply(transport);
}
// debug("end cat: " + node.id + " unread " + cat_unread);
-
- if (cat_unread == 0) {
- if (cat_node.style == undefined) {
- debug("ERROR: supplied cat_node " + cat_node +
- " has no styles. WTF?");
- return;
- }
- if (hide) {
- //cat_node.style.display = "none";
- Effect.Fade(cat_node, {duration : 0.3,
- queue: { position: 'end', scope: 'CFADE-' + node.id, limit: 1 }});
+
+ if (cat_node) {
+
+ if (cat_unread == 0) {
+ if (cat_node.style == undefined) {
+ debug("ERROR: supplied cat_node " + cat_node +
+ " has no styles. WTF?");
+ return;
+ }
+ if (hide) {
+ //cat_node.style.display = "none";
+ Effect.Fade(cat_node, {duration : 0.3,
+ queue: { position: 'end', scope: 'CFADE-' + node.id, limit: 1 }});
+ } else {
+ cat_node.style.display = "list-item";
+ }
} else {
- cat_node.style.display = "list-item";
- }
- } else {
- try {
- cat_node.style.display = "list-item";
- } catch (e) {
- debug(e);
+ try {
+ cat_node.style.display = "list-item";
+ } catch (e) {
+ debug(e);
+ }
}
}
return true;
}
+function strip_tags(s) {
+ return s.replace(/<\/?[^>]+(>|$)/g, "");
+}
+
+function truncate_string(s, length) {
+ if (!length) length = 30;
+ var tmp = s.substring(0, length);
+ if (s.length > length) tmp += "…";
+ return tmp;
+}