--- class.tslib_pagegen.php.bak 2007-02-24 16:30:59.000000000 +0100 +++ class.tslib_pagegen.php 2007-02-24 17:02:48.000000000 +0100 @@ -316,8 +316,11 @@ } } } - - return Array(count($functions)?' + if ($GLOBALS['TSFE']->config['config']['removeDefaultJS']=='external' && $GLOBALS['TSFE']->config['config']['removeAdditionalJS']=='external') { + $GLOBALS['TSFE']->JSCode .= implode(chr(10),$functions); + $functions = array(); + } + return Array((count($functions) || count($setEvents))?' '; } elseif ($GLOBALS['TSFE']->config['config']['removeDefaultJS']==='external') { - $GLOBALS['TSFE']->content.= TSpagegen::inline2TempFile($_scriptCode, 'js'); + $GLOBALS['TSFE']->content.= TSpagegen::inline2TempFile( + $_scriptCode. + ($GLOBALS['TSFE']->config['config']['removeAdditionalJS']=='external'? + chr(10).implode($GLOBALS['TSFE']->additionalJavaScript,chr(10)).chr(10).$GLOBALS['TSFE']->JSCode.chr(10).$GLOBALS['TSFE']->JSImgCode: + '' + ), + 'js' + ); + if ($GLOBALS['TSFE']->config['config']['removeAdditionalJS']=='external') { + $GLOBALS['TSFE']->additionalHeaderData['JSImgCode']=''; + $GLOBALS['TSFE']->additionalHeaderData['JSCode']=''; + } } - $GLOBALS['TSFE']->content.= chr(10).implode($GLOBALS['TSFE']->additionalHeaderData,chr(10)).' -'.$JSef[0].' + $GLOBALS['TSFE']->content.= chr(10).implode($GLOBALS['TSFE']->additionalHeaderData,chr(10)).chr(10).$JSef[0].' '; if ($GLOBALS['TSFE']->pSetup['frameSet.']) { $fs = t3lib_div::makeInstance('tslib_frameset');