]> git.wh0rd.org - tt-rss.git/blobdiff - index.php
catch plugin JS errors
[tt-rss.git] / index.php
index 360a6dc193632aafb7df0a86921ee77e9fa580be..6b27d90425e72fb9c4c9ebd1f0dc950140d5a812 100644 (file)
--- a/index.php
+++ b/index.php
@@ -66,7 +66,7 @@
        <?php if ($_SESSION["uid"]) {
                $theme = get_pref( "USER_CSS_THEME", $_SESSION["uid"], false);
                if ($theme && theme_valid("$theme")) {
-                       echo stylesheet_tag("themes/$theme");
+                       echo stylesheet_tag(get_theme_path($theme));
                } else {
                        echo stylesheet_tag("themes/default.css");
                }
        <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
        <link rel="icon" type="image/png" sizes="72x72" href="images/favicon-72px.png" />
 
+       <script>
+               dojoConfig = {
+                       async: true,
+                       packages: [
+                               { name: "fox", location: "../../js" },
+                       ]
+               };
+       </script>
+
        <?php
        foreach (array("lib/prototype.js",
                                "lib/scriptaculous/scriptaculous.js?load=effects,controls",
                require_once 'lib/jshrink/Minifier.php';
 
                print get_minified_js(array("tt-rss",
-                       "functions", "feedlist", "viewfeed", "FeedTree", "PluginHost"));
+                       "functions", "feedlist", "viewfeed", "PluginHost"));
 
                foreach (PluginHost::getInstance()->get_plugins() as $n => $p) {
                        if (method_exists($p, "get_js")) {
+                               echo "try {";
                                echo JShrink\Minifier::minify($p->get_js());
+                               echo "} catch (e) {
+                                       console.warn('failed to initialize plugin JS: $n');
+                                       console.warn(e);
+                               }";
                        }
                }
 
        </script>
 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+       <meta name="referrer" content="no-referrer"/>
 
        <script type="text/javascript">
                Event.observe(window, 'load', function() {
 
 <div id="notify" class="notify"></div>
 <div id="cmdline" style="display : none"></div>
-<div id="headlines-tmp" style="display : none"></div>
 
 <div id="main" dojoType="dijit.layout.BorderContainer">
 
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcShowOnlyUnread')"><?php echo __('(Un)hide read feeds') ?></div>
                                        <div dojoType="dijit.MenuItem" disabled="1"><?php echo __('Other actions:') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcToggleWidescreen')"><?php echo __('Toggle widescreen mode') ?></div>
-                                       <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcTagSelect')"><?php echo __('Select by tags...') ?></div>
                                        <!-- <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddLabel')"><?php echo __('Create label...') ?></div>
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcAddFilter')"><?php echo __('Create filter...') ?></div> -->
                                        <div dojoType="dijit.MenuItem" onclick="quickMenuGo('qmcHKhelp')"><?php echo __('Keyboard shortcuts help') ?></div>