• Hello I want to add a widget from Cryptocompare to my site.
    Link is here https://www.cryptocompare.com/dev/widget/wizard/?type=7&theme=0&fsym=xrp&tsyms=USD,EUR,CNY,GBP
    So I want to add that widget into my website home, to show there.
    https://prnt.sc/hujtxn
    Does anybody knows how to add that widget on which file I should add the script that’s below

    <script type="text/javascript">
    baseUrl = "https://widgets.cryptocompare.com/";
    var scripts = document.getElementsByTagName("script");
    var embedder = scripts[ scripts.length - 1 ];
    (function (){
    var appName = encodeURIComponent(window.location.hostname);
    if(appName==""){appName="local";}
    var s = document.createElement("script");
    s.type = "text/javascript";
    s.async = true;
    var theUrl = baseUrl+'serve/v1/coin/summary?fsym=xrp&tsyms=USD,EUR,CNY,GBP';
    s.src = theUrl + ( theUrl.indexOf("?") >= 0 ? "&" : "?") + "app=" + appName;
    embedder.parentNode.appendChild(s);
    })();
    </script>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add widget script on my site?’ is closed to new replies.