From 5b18c93622e97b9a251f3b85bdb088022fd5c0f3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 18 Mar 2013 20:59:48 +0400 Subject: tweak hotkey map notation to allow stuff like shift-arrows --- js/tt-rss.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/tt-rss.js') diff --git a/js/tt-rss.js b/js/tt-rss.js index badfe8707..5ada64d31 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -556,7 +556,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"); @@ -577,7 +577,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; -- cgit v1.2.3 From 4f7d69e1856a611025f53eef273e5af039d9aa16 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 19 Mar 2013 12:49:55 +0400 Subject: detect whether browser supports iframe.sandbox and allow iframes accordingly; allow object and embed elements --- js/tt-rss.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/tt-rss.js') diff --git a/js/tt-rss.js b/js/tt-rss.js index 5ada64d31..5968f58eb 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -244,9 +244,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); } }); -- cgit v1.2.3 From 4b746489098bc2d6bfc520715fb422b82259491c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 19 Mar 2013 16:46:27 +0400 Subject: remove two unnecessary hideOrShowFeeds calls --- js/tt-rss.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/tt-rss.js') diff --git a/js/tt-rss.js b/js/tt-rss.js index 5968f58eb..357e07780 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -895,8 +895,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 { -- cgit v1.2.3 From 1d5cf085a37e8e016242c9cfea631a90861ab306 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 19 Mar 2013 18:32:49 +0400 Subject: implement mail plugin using mailto: links; deprecate mail plugin --- js/tt-rss.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/tt-rss.js') diff --git a/js/tt-rss.js b/js/tt-rss.js index 357e07780..a8552d173 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -670,6 +670,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.")); } -- cgit v1.2.3 From d2db81a5f67dfc13bab7cf379d1182f7aa794eb1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 19 Mar 2013 19:13:56 +0400 Subject: improve hotkey buffer scrolling speed; bind viewport scrolling to shift-arrows --- js/tt-rss.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'js/tt-rss.js') diff --git a/js/tt-rss.js b/js/tt-rss.js index a8552d173..e9bc9d412 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -659,10 +659,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(); -- cgit v1.2.3