dojo.disconnect(tmph);
Element.hide("feedlistLoading");
- var hash_feed_id = hash_get('f');
- var hash_feed_is_cat = hash_get('c') == "1";
-
- if (hash_feed_id != undefined) {
- setActiveFeedId(hash_feed_id, hash_feed_is_cat);
- }
-
feedlist_init();
// var node = dijit.byId("feedTree")._itemNodesMap['FEED:-2'][0].domNode
var tmp = "Tiny Tiny RSS";
if (global_unread > 0) {
- tmp = tmp + " (" + global_unread + ")";
+ tmp = "(" + global_unread + ") " + tmp;
}
if (window.fluid) {
loading_set_progress(20);
var hasAudio = !!((myAudioTag = document.createElement('audio')).canPlayType);
+ var hasSandbox = "sandbox" in document.createElement("iframe");
new Ajax.Request("backend.php", {
- parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio},
+ parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio,
+ hasSandbox: hasSandbox},
onComplete: function(transport) {
backend_sanity_check_callback(transport);
} });
feeds_sort_by_unread = getInitParam("feeds_sort_by_unread") == 1;
+ var hash_feed_id = hash_get('f');
+ var hash_feed_is_cat = hash_get('c') == "1";
+
+ if (hash_feed_id != undefined) {
+ setActiveFeedId(hash_feed_id, hash_feed_is_cat);
+ }
+
loading_set_progress(30);
// can't use cache_clear() here because viewfeed might not have initialized yet
return;
}
+ if (k == "dep_ts" && parseInt(getInitParam("dep_ts")) > 0) {
+ if (parseInt(getInitParam("dep_ts")) < parseInt(v)) {
+ window.location.reload();
+ }
+ }
+
if (k == "daemon_is_running" && v != 1) {
notify_error("<span onclick=\"javascript:explainError(1)\">Update daemon is not running.</span>", true);
return;
if (keycode == 16) return; // ignore lone shift
if (keycode == 17) return; // ignore lone ctrl
- if (!shift_key) keychar = keychar.toLowerCase();
+ keychar = keychar.toLowerCase();
var hotkeys = getInitParam("hotkeys");
Element.hide(cmdline);
var hotkey = keychar.search(/[a-zA-Z0-9]/) != -1 ? keychar : "(" + keycode + ")";
+
+ // ensure ^*char notation
+ if (shift_key) hotkey = "*" + hotkey;
if (ctrl_key) hotkey = "^" + hotkey;
+
hotkey = hotkey_prefix ? hotkey_prefix + " " + hotkey : hotkey;
hotkey_prefix = false;
catchupRelativeToArticle(0);
return false;
case "article_scroll_down":
- scrollArticle(50);
+ var ctr = $("content_insert") ? $("content_insert") : $("headlines-frame");
+
+ scrollArticle(ctr.offsetHeight/3);
return false;
case "article_scroll_up":
- scrollArticle(-50);
+ var ctr = $("content_insert") ? $("content_insert") : $("headlines-frame");
+
+ scrollArticle(-ctr.offsetHeight/3);
return false;
case "close_article":
- closeArticlePanel();
+ if (isCdmMode()) {
+ if (!getInitParam("cdm_expanded")) {
+ cdmCollapseArticle(false, getActiveArticleId());
+ } else {
+ dismissArticle(getActiveArticleId());
+ }
+ } else {
+ closeArticlePanel();
+ }
return false;
case "email_article":
if (typeof emailArticle != "undefined") {
emailArticle();
+ } else if (typeof mailtoArticle != "undefined") {
+ mailtoArticle();
} else {
alert(__("Please enable mail plugin first."));
}
case "collapse_sidebar":
collapse_feedlist();
return false;
+ case "toggle_embed_original":
+ if (typeof embedOriginalArticle != "undefined") {
+ if (getActiveArticleId())
+ embedOriginalArticle(getActiveArticleId());
+ } else {
+ alert(__("Please enable embed_original plugin first."));
+ }
+ return false;
case "toggle_widescreen":
if (!isCdmMode()) {
_widescreen_mode = !_widescreen_mode;
return false;
case "help_dialog":
helpDialog("main");
+ return false;
+ case "toggle_combined_mode":
+ notify_progress("Loading, please wait...");
+
+ var value = isCdmMode() ? "false" : "true";
+ var query = "?op=rpc&method=setpref&key=COMBINED_DISPLAY_MODE&value=" + value;
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ window.location.reload();
+ } });
+
return false;
default:
console.log("unhandled action: " + hotkey_action + "; hotkey: " + hotkey);
if (runtime_info)
parse_runtime_info(runtime_info);
- hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
-
Element.hide(dijit.byId("net-alert").domNode);
} else {
function switchPanelMode(wide) {
try {
+ if (isCdmMode()) return;
+
article_id = getActiveArticleId();
if (wide) {