How can I use drupal_add_js() to include the following script? How can I use drupal_add_js() to include the following script?

&lt;script src="http://example.net/script.js" data-config="{'skin':'skins/black/skin.css','volume':50,'autoplay':true,'shuffle':true,'repeat':1,'placement':'bottom','showplaylist':false,'playlist':[{'title':'','url':'https://soundcloud.com/fosterthepeoplemusic/pumpedupkicks'}]}" &gt;&lt;/script&gt;
I recently came across this issue and was able to work around the limitations of drupal_add_js() with the following hack:

//this can be any string of js that's already wrapped in &lt;script&gt; elements
$my_script = '&lt;script ...[all the things]... &gt;&lt;/script&gt;';

drupal_add_js('&lt;/script&gt;' . $my_script . '&lt;script&gt;', array(
  'type' =&gt; 'inline',
  'scope' =&gt; 'header', //or 'footer'
  //...any other options you want to add
));


You end up with two empty &lt;script&gt; elements in your markup, which I find annoying, but they don't actually do any harm.