From e212395f00283c68313cc6f470b9ce0a30bf2f1d Mon Sep 17 00:00:00 2001 From: alsoft10 Date: Thu, 20 Jan 2022 12:12:59 +0530 Subject: [PATCH] PR REQUEST #19679 --- htdocs/main.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 4ec8767a801..5ae92c702a0 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1766,6 +1766,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";