diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 4ec8767a801..fd811877295 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1767,6 +1767,14 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } } + //If you want to load custom javascript file from your selected theme directory + if (!empty($conf->global->ALLOW_THEME_JS)) { + $theme_js = dol_buildpath('/theme/'.$conf->theme.'/'.$conf->theme.'.js', 0); + if (file_exists($theme_js)) { + print ''."\n"; + } + } + if (!empty($head)) { print $head."\n"; }