1
0
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:
Jakub Vrana
2025-03-27 10:11:35 +01:00
parent 81ae16bce1
commit 0578b5c490
4 changed files with 8 additions and 2 deletions

View File

@@ -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);
}