]> git.wh0rd.org - tt-rss.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorRichard Beales <rich@richbeales.net>
Tue, 19 Mar 2013 18:19:07 +0000 (18:19 +0000)
committerRichard Beales <rich@richbeales.net>
Tue, 19 Mar 2013 18:19:07 +0000 (18:19 +0000)
1  2 
js/tt-rss.js

diff --combined js/tt-rss.js
index 5d6e1d81ec5399dccb4f289af4ad0dea035d36a9,e9bc9d412d615213036a03bf1af762b753f01b8b..3b96566f904977494fd89cf02d573611c1f2b280
@@@ -178,11 -178,7 +178,11 @@@ function search() 
  }
  
  function updateTitle() {
 -      var tmp = "Tiny Tiny RSS";
 +      var tmp = document.title; 
 +    if (tmp.indexOf('(')>0)
 +    {
 +       tmp = tmp.substr(0,tmp.lastIndexOf('('));
 +    }
  
        if (global_unread > 0) {
                tmp = tmp + " (" + global_unread + ")";
@@@ -248,9 -244,11 +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 -558,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");
  
                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();
                case "email_article":
                        if (typeof emailArticle != "undefined") {
                                emailArticle();
+                       } else if (typeof mailtoArticle != "undefined") {
+                               mailtoArticle();
                        } else {
                                alert(__("Please enable mail plugin first."));
                        }
@@@ -893,8 -901,6 +905,6 @@@ function handle_rpc_json(transport, sch
                        if (runtime_info)
                                parse_runtime_info(runtime_info);
  
-                       hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
                        Element.hide(dijit.byId("net-alert").domNode);
  
                } else {