Hello,
I would like to add a widget to my site using some javascript code. I’ve added the code to the Public and made a help-widget.js. Here is the code:
(function(){ var w=window; function l(){ var d=document; var aws=d.createElement('script'); aws.type='text/javascript'; aws.async=true; aws.src='https://unity.wixanswers.com/apps/widget/v1/unity/------/en/embed.js'; aws.onload = aws.onreadystatechange = function() { var rs = this.readyState; if (rs && rs != 'complete' && rs != 'loaded') return; // try { // } catch (e) {} }; var s=d.getElementsByTagName('script')[0]; s.parentNode.insertBefore(aws,s); } if(w.addEventListener){ w.addEventListener('load',l); }else{ w.attachEvent('onload',l); } })()
How can I go about now adding this to the actual site?