In order to work with Cloudflare's Rocket Loader service, certain scripts need to have their script tags updated with the cf-async="false" attribute like so:
<script type="text/javascript" cf-async="false">
Specifically, I need to add this attribute to the Drupal settings script tag, that gets added inline at the top of every page.
My first thought was to do this via hook_js_alter(), like:
function custom_helper_js_alter(&$javascript) {
$javascript['settings']['cf-async'] = 'false';
}
But it doesn't seem to be possible to add custom attribute tags via this function. So my question is, is there any way at all to do what I want without hacking core?