- foreach (array("tt-rss", "functions", "feedlist", "viewfeed", "FeedTree") as $js) {
- if (!isset($_GET['debug'])) {
- echo JSMin::minify(file_get_contents("js/$js.js"));
- } else {
- echo file_get_contents("js/$js.js");
+ <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,
+ cacheBust: new Date(),
+ packages: [
+ { name: "fox", location: "../../js" },
+ ]
+ };
+ </script>
+
+ <?php
+ foreach (array("lib/prototype.js",
+ "lib/scriptaculous/scriptaculous.js?load=effects,controls",
+ "lib/dojo/dojo.js",
+ "lib/dojo/tt-rss-layer.js",
+ "errors.php?mode=js") as $jsfile) {
+
+ echo javascript_tag($jsfile);
+
+ } ?>
+
+ <script type="text/javascript">
+ 'use strict';
+ require({cache:{}});
+ <?php
+ print get_minified_js(["tt-rss.js",
+ "functions.js", "feedlist.js", "viewfeed.js", "PluginHost.js"]);
+ ?>
+ </script>
+ <script type="text/javascript">
+ <?php
+ 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);
+ }";