]> git.wh0rd.org Git - tt-rss.git/commitdiff
do not enforce strict mode for plugins
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 8 Mar 2018 15:41:03 +0000 (18:41 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 8 Mar 2018 15:41:03 +0000 (18:41 +0300)
index.php
prefs.php

index 31d7670386f1886dc9a86d2cac0b540fe728f611..fb24066fd8803666ed63300fff90714201f7c9fb 100644 (file)
--- a/index.php
+++ b/index.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 {";
index bffd5cdf5c526bf025ea595202a8cb82e54d91df..89e5f4c2a6051a0ecd7a3eaf4e269f814c9e370c 100644 (file)
--- a/prefs.php
+++ b/prefs.php
        } ?>
 
        <script type="text/javascript">
+               'use strict';
                require({cache:{}});
        <?php
                require_once 'lib/jshrink/Minifier.php';
 
+               print get_minified_js(["functions.js", "prefs.js"]);
+       ?>
+       </script>
+       <script type="text/javascript">
+       <?php
                foreach (PluginHost::getInstance()->get_plugins() as $n => $p) {
                        if (method_exists($p, "get_prefs_js")) {
                                echo "try {";
@@ -92,8 +98,6 @@
                        }
                }
 
-               print get_minified_js(["functions.js", "prefs.js"]);
-
                init_js_translations();
        ?>
        </script>