]> git.wh0rd.org - tt-rss.git/blobdiff - js/tt-rss.js
implement mail plugin using mailto: links; deprecate mail plugin
[tt-rss.git] / js / tt-rss.js
index badfe8707440a1d423017f1bb1d230cede90ed38..a8552d17373e57b0cccfda5ae53951a86c002985 100644 (file)
@@ -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);
                                } });
@@ -556,7 +558,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 +579,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;
 
@@ -664,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."));
                        }
@@ -889,8 +897,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 {