]> git.wh0rd.org - tt-rss.git/blobdiff - js/tt-rss.js
Merge remote-tracking branch 'upstream/master'
[tt-rss.git] / js / tt-rss.js
index bced926745af8851121fff6a35d56f107b8037a4..1d6540dbb47e90c8b6a94551cda23d9e49bbf7e2 100644 (file)
@@ -178,10 +178,14 @@ 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 + ")";
+               tmp = "(" + global_unread + ") " + tmp;
        }
 
        if (window.fluid) {
@@ -446,6 +450,12 @@ function parse_runtime_info(data) {
                        return;
                }
 
+               if (k == "dep_ts" && parseInt(getInitParam("dep_ts")) > 0) {
+                       if (parseInt(getInitParam("dep_ts")) < parseInt(v)) {
+                               window.location.reload();
+                       }
+               }
+
                if (k == "daemon_is_running" && v != 1) {
                        notify_error("<span onclick=\"javascript:explainError(1)\">Update daemon is not running.</span>", true);
                        return;
@@ -786,6 +796,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;
@@ -928,6 +946,8 @@ function handle_rpc_json(transport, scheduled_call) {
 
 function switchPanelMode(wide) {
        try {
+               if (isCdmMode()) return;
+
                article_id = getActiveArticleId();
 
                if (wide) {