summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-13 20:13:30 +0300
committerAndrew Dolgov <[email protected]>2018-12-13 20:13:30 +0300
commit356729310bcee7a91130c37b28a9ca519cd51bd9 (patch)
treedf3560314142c171a53b105d1a8ad73136d705fb /index.php
parenta1454a6c1d52dfaaad9752c188ca815442685f52 (diff)
remove jshrink
Diffstat (limited to 'index.php')
-rw-r--r--index.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/index.php b/index.php
index 435965d02..b98a5d6b0 100644
--- a/index.php
+++ b/index.php
@@ -117,12 +117,15 @@
<?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);
- }";
+ $script = $p->get_js();
+
+ if ($script) {
+ echo "try {
+ $script
+ } catch (e) {
+ console.warn('failed to initialize plugin JS: $n', e);
+ }";
+ }
}
}