diff options
author | Andrew Dolgov <[email protected]> | 2018-12-13 20:13:30 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-13 20:13:30 +0300 |
commit | 356729310bcee7a91130c37b28a9ca519cd51bd9 (patch) | |
tree | df3560314142c171a53b105d1a8ad73136d705fb /prefs.php | |
parent | a1454a6c1d52dfaaad9752c188ca815442685f52 (diff) |
remove jshrink
Diffstat (limited to 'prefs.php')
-rw-r--r-- | prefs.php | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -84,12 +84,15 @@ <?php foreach (PluginHost::getInstance()->get_plugins() as $n => $p) { if (method_exists($p, "get_prefs_js")) { - echo "try {"; - echo JShrink\Minifier::minify($p->get_prefs_js()); - echo "} catch (e) { - console.warn('failed to initialize plugin JS: $n'); - console.warn(e); - }"; + $script = $p->get_prefs_js(); + + if ($script) { + echo "try { + $script + } catch (e) { + console.warn('failed to initialize plugin JS: $n', e); + }"; + } } } |