diff options
author | Richard Beales <[email protected]> | 2013-03-19 18:19:07 +0000 |
---|---|---|
committer | Richard Beales <[email protected]> | 2013-03-19 18:19:07 +0000 |
commit | 05809dfdf7cbf7699be6408c0f49d325585726b5 (patch) | |
tree | bfa33dcd1cf8707e65a05df98d27d563396520d2 /js/tt-rss.js | |
parent | 1d707e9f03d1a654e0807aadce7ab790befd0b95 (diff) | |
parent | 2229e6ed6b07d4a28b04689a21c645bdb83652f7 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r-- | js/tt-rss.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js index 5d6e1d81e..3b96566f9 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -248,9 +248,11 @@ function init() { 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); } }); @@ -560,7 +562,7 @@ function hotkey_handler(e) { 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"); @@ -581,7 +583,11 @@ function hotkey_handler(e) { 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; @@ -657,10 +663,14 @@ function hotkey_handler(e) { 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(); @@ -668,6 +678,8 @@ function hotkey_handler(e) { case "email_article": if (typeof emailArticle != "undefined") { emailArticle(); + } else if (typeof mailtoArticle != "undefined") { + mailtoArticle(); } else { alert(__("Please enable mail plugin first.")); } @@ -893,8 +905,6 @@ function handle_rpc_json(transport, scheduled_call) { if (runtime_info) parse_runtime_info(runtime_info); - hideOrShowFeeds(getInitParam("hide_read_feeds") == 1); - Element.hide(dijit.byId("net-alert").domNode); } else { |