]> git.wh0rd.org Git - tt-rss.git/commitdiff
add a e hotkey for embed_original
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 21 Mar 2013 12:57:36 +0000 (16:57 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 21 Mar 2013 12:57:36 +0000 (16:57 +0400)
include/functions.php
js/tt-rss.js

index 72cca500e89f7b32632d295351ae1aed58a1433a..3d6b7c89ad16c1e7e7febdfced11d730877920a2 100644 (file)
                                "select_article_cursor" => __("Select article under cursor"),
                                "email_article" => __("Email article"),
                                "close_article" => __("Close/collapse article"),
-                               "toggle_widescreen" => __("Toggle widescreen mode")),
+                               "toggle_widescreen" => __("Toggle widescreen mode"),
+                               "toggle_embed_original" => __("Toggle embed original")),
                        __("Article selection") => array(
                                "select_all" => __("Select all articles"),
                                "select_unread" => __("Select unread"),
                                "*(38)|Shift+up" => "article_scroll_up",
                                "*(40)|Shift+down" => "article_scroll_down",
                                "a *w" => "toggle_widescreen",
+                               "a e" => "toggle_embed_original",
                                "e" => "email_article",
                                "a q" => "close_article",
 //                     "article_selection" => array(
index bced926745af8851121fff6a35d56f107b8037a4..77bb5117c52be2145653dc781716caa433c2803f 100644 (file)
@@ -786,6 +786,14 @@ function hotkey_handler(e) {
                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;