public static function endJavascriptCompress()
{
$js = ob_get_contents();
if (false === $js) {
return;
}
ob_end_clean();
// Remove comments
//$content = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $content );
// Replace with none
$none = array("\t", ' ', ' ', ' ');
$js = str_replace($none, '', $js);
// Optimized
$js = str_replace(array('= ', ' ='), '=', $js);
// Remove tabs, spaces, newlines, etc..
$content = trim($js);
return $content;
}