$("headlines-frame").setAttribute("is-cat", is_cat ? 1 : 0);
selectFeed(id, is_cat);
+
+ PluginHost.run(PluginHost.HOOK_FEED_SET_ACTIVE, _active_article_id);
} catch (e) {
exception_error("setActiveFeedId", e);
}
new Ajax.Request("backend.php", {
parameters: query_str,
onComplete: function(transport) {
- feedlist_callback2(transport);
+ request_counters(true);
+ viewCurrentFeed();
} });
global_unread = 0;
loading_set_progress(20);
- var hasAudio = !!((myAudioTag = document.createElement('audio')).canPlayType);
+ var a = document.createElement('audio');
+
+ var hasAudio = !!a.canPlayType;
var hasSandbox = "sandbox" in document.createElement("iframe");
+ var hasMp3 = !!(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
+ var clientTzOffset = new Date().getTimezoneOffset() * 60;
new Ajax.Request("backend.php", {
parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio,
+ hasMp3: hasMp3,
+ clientTzOffset: clientTzOffset,
hasSandbox: hasSandbox},
onComplete: function(transport) {
backend_sanity_check_callback(transport);
var id = getActiveArticleId();
var elem = $("CICD-"+id);
if(elem.visible()) {
- cdmUnexpandArticle(null, id);
+ cdmCollapseArticle(null, id, false);
}
else {
cdmExpandArticle(id);
hotkey_actions["edit_tags"] = function() {
var id = getActiveArticleId();
if (id) {
- editArticleTags(id, getActiveFeedId(), isCdmMode());
+ editArticleTags(id);
};
}
hotkey_actions["dismiss_selected"] = function() {
init_params[k] = v;
notify('');
}
+
+ PluginHost.run(PluginHost.HOOK_RUNTIME_INFO_LOADED, data);
}
function collapse_feedlist() {
if (counters)
parse_counters(counters, scheduled_call);
- var runtime_info = reply['runtime-info'];;
+ var runtime_info = reply['runtime-info'];
if (runtime_info)
parse_runtime_info(runtime_info);
kv = window.location.hash.substring(1).toQueryParams();
return kv[key];
} catch (e) {
- exception_error("hash_set", e);
+ exception_error("hash_get", e);
}
}
function hash_set(key, value) {