mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 22:27:24 +02:00
JS: Add 'use strict'
This commit is contained in:
@@ -213,6 +213,11 @@ function minify_css($file) {
|
||||
}
|
||||
|
||||
function minify_js($file) {
|
||||
$file = preg_replace_callback("~'use strict';~", function ($match) { // keep only the first one
|
||||
static $count = 0;
|
||||
$count++;
|
||||
return ($count == 1 ? $match[0] : '');
|
||||
}, $file);
|
||||
if (function_exists('jsShrink')) {
|
||||
$file = jsShrink($file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user