Skip to content

Commit

Permalink
use jquery migrate debug version when allowdebug is enabled
Browse files Browse the repository at this point in the history
The minimized version meant for production will not output any useful
info to console. With this patch developers can enable debugging and get
stacktraces on what needs adjustments.
  • Loading branch information
splitbrain committed May 1, 2020
1 parent 6086afb commit ea68015
Show file tree
Hide file tree
Showing 3 changed files with 760 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/exe/jquery.php
Expand Up @@ -21,12 +21,19 @@
* uses cache or fills it
*/
function jquery_out() {
global $conf;
$cache = new Cache('jquery', '.js');
$files = array(
DOKU_INC . 'lib/scripts/jquery/jquery.min.js',
DOKU_INC . 'lib/scripts/jquery/jquery-ui.min.js',
DOKU_INC . 'lib/scripts/jquery/jquery-migrate.min.js',
);
if($conf['allowdebug']) {
// uncompressed development version
$files[] = DOKU_INC . 'lib/scripts/jquery/jquery-migrate.js';
} else {
$files[] = DOKU_INC . 'lib/scripts/jquery/jquery-migrate.min.js';
}

$cache_files = $files;
$cache_files[] = __FILE__;

Expand Down

0 comments on commit ea68015

Please sign in to comment.