I'm trying to unset all javascript declarations in the docdocument head but only the core gets unset.
By this I mean inline javascript that is added by 3rd party extensions using ->addScriptDeclaration(), and anythingnot javascript files that are added using ->addScript().
If I dump
$doc = JFactory::getDocument();
var_dump($doc->_scripts);
then all Javascript files added by an extension is still outputted in the headJoomla core and 3rd party extensions are shown.
If I dump
$this$doc = JFactory::getDocument();
var_dump($doc->_script['text/javascript']);
then itThen only contains the core script. Even dumpingjavascript is shown, eg:
string(79) "jQuery(window).on('load', function() {
new JCaption('img.caption');
});"
Anything added by 3rd party extensions is not included and still gets outputted to the whole document doesn't show anythinghead.
Is it possible to intercept 3rd party script in the template or is it added at a later date and can only be done by a plugin at a certain event?