Previously it would not be possible to simply paste usual JavaScript provided by 3rd parties, since they don't use the relocate-attribute. This isn't an issue, as long as you don't need jQuery, but if you do things would either fail or you need to include jQuery twice.
</footer>
{event name='footer'}
+
+<!-- JAVASCRIPT_RELOCATE_POSITION -->
+
{@FOOTER_CODE}
<a id="bottom"></a>
return '';
}, self::$output);
- self::$output = str_replace(array('</body>', '</html>'), array('', ''), self::$output);
- self::$output .= "\n".implode("\n", $javascript)."\n</body></html>";
+ self::$output = str_replace('<!-- JAVASCRIPT_RELOCATE_POSITION -->', implode("\n", $javascript), self::$output);
// 3rd party plugins may differ the actual output before it is sent to the browser
// please be aware, that $eventObj is not available here due to this being a static