forked from Adleraci/adlerka.top
test inlining
This commit is contained in:
parent
1d1b31f035
commit
dc0ed52b06
@ -58,13 +58,13 @@ function minifyCss($css) {
|
||||
|
||||
function minifyJs($js) {
|
||||
// Remove block comments
|
||||
$js = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $js);
|
||||
//$js = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $js);
|
||||
|
||||
// Remove line comments
|
||||
$js = preg_replace('!(//.*)|(/\*.*?\*/)!s', '', $js);
|
||||
//$js = preg_replace('!(//.*)|(/\*.*?\*/)!s', '', $js);
|
||||
|
||||
// Remove newlines and tabs
|
||||
$js = str_replace(array("\r\n", "\r", "\n", "\t"), '', $js);
|
||||
//$js = str_replace(array("\r\n", "\r", "\n", "\t"), '', $js);
|
||||
|
||||
// Remove spaces around operators
|
||||
$js = preg_replace('~\s*([=+\-*/])\s*~', '$1', $js);
|
||||
|
Loading…
Reference in New Issue
Block a user