diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9753f4b3d83..be964015f75 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1744,6 +1744,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";