mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 06:07:57 +02:00
JS: Add 'use strict'
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// Adminer specific functions
|
'use strict'; // Adminer specific functions
|
||||||
|
|
||||||
/** Load syntax highlighting
|
/** Load syntax highlighting
|
||||||
* @param string first three characters of database system version
|
* @param string first three characters of database system version
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
/** Get first element by selector
|
/** Get first element by selector
|
||||||
* @param string
|
* @param string
|
||||||
|
@@ -213,6 +213,11 @@ function minify_css($file) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function minify_js($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')) {
|
if (function_exists('jsShrink')) {
|
||||||
$file = jsShrink($file);
|
$file = jsShrink($file);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Editor specific functions
|
'use strict'; // Editor specific functions
|
||||||
|
|
||||||
function messagesPrint() {
|
function messagesPrint() {
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user