From ee378ec6b9c889feb47bf22c8ca9e30137cec1a3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 11 Jan 2014 18:39:55 +0000 Subject: [PATCH] Remove all "use strict" as we have a mixure of strict and non-strict code (mostly externals libs) --- phpgwapi/inc/min/config.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpgwapi/inc/min/config.php b/phpgwapi/inc/min/config.php index ab95d890d7..ee3d27f30f 100755 --- a/phpgwapi/inc/min/config.php +++ b/phpgwapi/inc/min/config.php @@ -161,6 +161,12 @@ $min_symlinks = array(); list($sitePrefix) = explode('/phpgwapi/inc/min/', $_SERVER['REQUEST_URI']); $min_symlinks['//'.ltrim($sitePrefix, '/')] = dirname(dirname(dirname(__DIR__))); +/** + * Remove all "use strict" as we have a mixure of strict and non-strict code (mostly externals libs) + * and javascript is supposed to run quicker without anyway. + */ +$min_serveOptions['postprocessor'] = function($in){ return str_replace(array('"use strict";', '"use strict"'), '', $in);}; + /** * If you upload files from Windows to a non-Windows server, Windows may report * incorrect mtimes for the files. This may cause Minify to keep serving stale