]> git.wh0rd.org - tt-rss.git/blobdiff - tt-rss.js
implement automatic precaching for next normal and unread feeds
[tt-rss.git] / tt-rss.js
index cb3fa26f8dfa2b0b94c0574cfcd1a109f734ab46..3e0e95919c413453fb4db532e06f7f205f163525 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -330,7 +330,8 @@ function init_second_stage() {
 
                loading_set_progress(30);
 
-               if (has_local_storage())
+               // can't use cache_clear() here because viewfeed might not have initialized yet
+               if ('sessionStorage' in window && window['sessionStorage'] !== null)
                        sessionStorage.clear();
 
                console.log("second stage ok");
@@ -350,6 +351,10 @@ function quickMenuGo(opid) {
                        displayDlg("printTagCloud");
                }
 
+               if (opid == "qmcTagSelect") {
+                       displayDlg("printTagSelect");
+               }
+
                if (opid == "qmcSearch") {
                        search();
                        return;
@@ -427,6 +432,16 @@ function quickMenuGo(opid) {
                        Effect.Appear("hotkey_help_overlay", {duration : 0.3});
                }
 
+               if (opid == "qmcAbout") {
+                       dialog = new dijit.Dialog({
+                               title: __("About..."),
+                               style: "width: 400px",
+                               href: "backend.php?op=dlg&id=about",
+                       });
+
+                       dialog.show();
+               }
+
        } catch (e) {
                exception_error("quickMenuGo", e);
        }
@@ -551,12 +566,10 @@ function collapse_feedlist() {
 }
 
 function viewModeChanged() {
-       cache_flush();
        return viewCurrentFeed('')
 }
 
 function viewLimitChanged() {
-       cache_flush();
        return viewCurrentFeed('')
 }
 
@@ -644,7 +657,7 @@ function hotkey_handler(e) {
                if (keycode == 16) return; // ignore lone shift
                if (keycode == 17) return; // ignore lone ctrl
 
-               if ((keycode == 70 || keycode == 67 || keycode == 71)
+               if ((keycode == 70 || keycode == 67 || keycode == 71 || keycode == 65)
                                && !hotkey_prefix) {
 
                        var date = new Date();
@@ -670,6 +683,11 @@ function hotkey_handler(e) {
 
                if (!hotkey_prefix) {
 
+                       if (keycode == 69) { // e
+                               var id = getActiveArticleId();
+                               emailArticle(id);
+                       }
+
                        if ((keycode == 191 || keychar == '?') && shift_key) { // ?
                                if (!Element.visible("hotkey_help_overlay")) {
                                        Effect.Appear("hotkey_help_overlay", {duration : 0.3});
@@ -756,7 +774,6 @@ function hotkey_handler(e) {
                                return;
                        }
 
-
                        if (keycode == 85) { // u
                                selectionToggleUnread(undefined, false, true)
                                return;
@@ -805,6 +822,33 @@ function hotkey_handler(e) {
                        }
                }
 
+               /* Prefix a */
+
+               if (hotkey_prefix == 65) { // a
+                       hotkey_prefix = false;
+
+                       if (keycode == 65) { // a
+                               selectArticles('all');
+                               return;
+                       }
+
+                       if (keycode == 85) { // u
+                               selectArticles('unread');
+                               return;
+                       }
+
+                       if (keycode == 73) { // i
+                               selectArticles('invert');
+                               return;
+                       }
+
+                       if (keycode == 78) { // n
+                               selectArticles('none');
+                               return;
+                       }
+
+               }
+
                /* Prefix f */
 
                if (hotkey_prefix == 70) { // f
@@ -950,8 +994,8 @@ function hotkey_handler(e) {
                                return false;
                        }
 
-                       if (keycode == 84 && shift_key) { // T
-                               toggleTags();
+                       if (keycode == 84) { // t
+                               displayDlg("printTagCloud");
                                return false;
                        }
                }