]> git.wh0rd.org - tt-rss.git/blobdiff - js/tt-rss.js
remove expandable CDM headlines
[tt-rss.git] / js / tt-rss.js
index eb00ad54bfc64c3dfb5e4dfcacfd65c105293575..1270f6e3337f6c8e044aa1be01702eb33fd8ffc5 100644 (file)
@@ -235,17 +235,15 @@ function init() {
                                                return false;
 
                                        loading_set_progress(30);
-
-                                       const a = document.createElement('audio');
-
-                                       const hasAudio = !!a.canPlayType;
-                                       const hasSandbox = "sandbox" in document.createElement("iframe");
-                                       const hasMp3 = !!(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
-                                       const clientTzOffset = new Date().getTimezoneOffset() * 60;
-
                                        init_hotkey_actions();
 
-                                       const params = {
+                    const a = document.createElement('audio');
+                    const hasAudio = !!a.canPlayType;
+                    const hasSandbox = "sandbox" in document.createElement("iframe");
+                    const hasMp3 = !!(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
+                    const clientTzOffset = new Date().getTimezoneOffset() * 60;
+
+                    const params = {
                             op: "rpc", method: "sanityCheck", hasAudio: hasAudio,
                             hasMp3: hasMp3,
                             clientTzOffset: clientTzOffset,
@@ -301,32 +299,6 @@ function init_hotkey_actions() {
        hotkey_actions["prev_article_noexpand"] = function() {
                moveToPost('prev', true, true);
        };
-       hotkey_actions["collapse_article"] = function() {
-               const id = getActiveArticleId();
-               const elem = $("CICD-"+id);
-
-               if (elem) {
-                       if (elem.visible()) {
-                               cdmCollapseArticle(null, id);
-                       }
-                       else {
-                               cdmExpandArticle(id);
-                       }
-               }
-       };
-       hotkey_actions["toggle_expand"] = function() {
-               const id = getActiveArticleId();
-               const elem = $("CICD-"+id);
-
-               if (elem) {
-                       if (elem.visible()) {
-                               cdmCollapseArticle(null, id, false);
-                       }
-                       else {
-                               cdmExpandArticle(id);
-                       }
-               }
-       };
        hotkey_actions["search_dialog"] = function() {
                search();
        };
@@ -363,13 +335,7 @@ function init_hotkey_actions() {
                scrollArticle(-40);
        };
        hotkey_actions["close_article"] = function() {
-               if (isCdmMode()) {
-                       if (!getInitParam("cdm_expanded")) {
-                               cdmCollapseArticle(false, getActiveArticleId());
-                       }
-               } else {
-                       closeArticlePanel();
-               }
+               closeArticlePanel();
        };
        hotkey_actions["email_article"] = function() {
                if (typeof emailArticle != "undefined") {
@@ -533,16 +499,6 @@ function init_hotkey_actions() {
             viewCurrentFeed();
                })
        };
-       hotkey_actions["toggle_cdm_expanded"] = function() {
-               notify_progress("Loading, please wait...");
-
-        const value = getInitParam("cdm_expanded") ? "false" : "true";
-
-               xhrPost("backend.php", {op: "rpc", method: "setpref", key: "CDM_EXPANDED", value: value}, () => {
-            setInitParam("cdm_expanded", !getInitParam("cdm_expanded"));
-            viewCurrentFeed();
-        });
-       };
 }
 
 function init_second_stage() {