]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
support disabling of e-mail digests entirely
[tt-rss.git] / include / functions.php
index 1dd9a7a1cc7fd106d5d7a5130bac9612600fe9a6..f6d09fe6714e7ee27384926ca2a500e79395aac0 100755 (executable)
                                "feed_debug_viewfeed" => __("Debug viewfeed()"),
                                "catchup_all" => __("Mark all feeds as read"),
                                "cat_toggle_collapse" => __("Un/collapse current category"),
+                               "toggle_cdm_expanded" => __("Toggle auto expand in combined mode"),
                                "toggle_combined_mode" => __("Toggle combined mode")),
                        __("Go to") => array(
                                "goto_all" => __("All articles"),
                        "f *d" => "feed_debug_update",
                        "f *g" => "feed_debug_viewfeed",
                        "f *c" => "toggle_combined_mode",
+                       "f c" => "toggle_cdm_expanded",
                        "*q" => "catchup_all",
                        "x" => "cat_toggle_collapse",
        //                      "goto" => array(
                        "^(191)|Ctrl+/" => "help_dialog",
                );
 
-               if (get_pref('COMBINED_DISPLAY_MODE')) {
-                       $hotkeys["^(38)|Ctrl-up"] = "prev_article_noscroll";
-                       $hotkeys["^(40)|Ctrl-down"] = "next_article_noscroll";
-               }
+               $hotkeys["^(38)|Ctrl-up"] = "prev_article_noscroll";
+               $hotkeys["^(40)|Ctrl-down"] = "next_article_noscroll";
 
                foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HOTKEY_MAP) as $plugin) {
                        $hotkeys = $plugin->hook_hotkey_map($hotkeys);
                $data["num_feeds"] = (int) $num_feeds;
 
                $data['last_article_id'] = Article::getLastArticleId();
+               $data['cdm_expanded'] = get_pref('CDM_EXPANDED');
 
                $data['dep_ts'] = calculate_dep_timestamp();
                $data['reload_on_ts_change'] = !defined('_NO_RELOAD_ON_TS_CHANGE');
                                                array_push($attrs_to_remove, $attr);
                                        }
 
+                                       if (strpos($attr->nodeName, "data-") === 0) {
+                                               array_push($attrs_to_remove, $attr);
+                                       }
+
                                        if ($attr->nodeName == 'href' && stripos($attr->value, 'javascript:') === 0) {
                                                array_push($attrs_to_remove, $attr);
                                        }