var last_feeds = []; var _active_feed_id = false; var _active_feed_offset = false; function viewfeed(feed_id, offset) { try { if (!feed_id) feed_id = _active_feed_id; if (!offset) offset = 0; else offset = _active_feed_offset + offset; var query = "backend.php?op=rpc&subop=digest-update&feed_id=" + feed_id + "&offset=" + offset; console.log(query); new Ajax.Request("backend.php", { parameters: query, onComplete: function(transport) { digest_update(transport); _active_feed_id = feed_id; _active_feed_offset = offset; } }); } catch (e) { exception_error("view", e); } } function find_feed(feeds, feed_id) { try { for (var i = 0; i < feeds.length; i++) { if (feeds[i].id == feed_id) return feeds[i]; } return false; } catch (e) { exception_error("find_feed", e); } } function get_feed_icon(feed) { try { if (feed.has_icon) return 'icons/' + feed.id + '.ico'; if (feed.id == -1) return 'images/mark_set.png'; if (feed.id == -2) return 'images/pub_set.png'; if (feed.id == -3) return 'images/fresh.png'; if (feed.id == -4) return 'images/tag.png'; if (feed.id < -10) return 'images/label.png'; } catch (e) { exception_error("get_feed_icon", e); } } function add_feed_entry(feed) { try { var icon_part = ""; icon_part = ""; var tmp_html = "