Duplicate of
Here's a code snipped from UserVoice in order to stick their tab on my site (this isn't specific to UserVoice however, I see this kind of thing all the time):
<script type="text/javascript">
var uservoiceJsHost = ("https:" == document.location.protocol) ? "https://uservoice.com" : "http://cdn.uservoice.com";
document.write(unescape("%3Cscript src='" + uservoiceJsHost + "/javascripts/widgets/tab.js' type='text/javascript'%3E%3C/script%3E"))
</script>
<script type="text/javascript">
UserVoice.Tab.show({
key: 'wikipediamaze',
host: 'wikipediamaze.uservoice.com',
forum: 'general',
alignment: 'right', /* 'left', 'right' */
background_color: '#94C97B',
text_color: 'white', /* 'white', 'black' */
hover_color: '#7AA1C5',
lang: 'en' /* 'en', 'de', 'nl', 'es', 'fr' */
})
</script>
How this can't all be jammed into one script tag and put into a separate file? Any time I try do it, it doesn't work. Google ads does the same kind of thing. Why are there 2 separate script declarations?