• Hello all!

    I am having trouble with implementing one WP plugin. This is the plugin site:

    https://www.cryptocompare.com/dev/widget/wizard/?type=1&theme=0&fsym=BTC&tsym=USD&period=1D

    And this is the plugin I have inserted into Custom HTML widget field:

    <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/multi?fsyms=BTC,XRP,ETH,BCH,ADA,LTC,IOT,XEM,DASH,XMR&tsyms=USD,EUR,BTC,CZK';
    s.src = theUrl + ( theUrl.indexOf('?') >= 0 ? '&' : '?') + 'app=' + appName;
    embedder.parentNode.appendChild(s);
    })();
    </script>

    WP gave me a few code errors, so I corrected them, but there is one last error I cant seem to correct, it is baseUrl error:

    
    baseUrl = 'https://widgets.cryptocompare.com/';
    
    var theUrl = baseUrl+'serve/v1/coin/multi?fsyms=BTC,XRP,ETH,BCH,ADA,LTC,IOT,XEM,DASH,XMR&tsyms=USD,EUR,BTC,CZK';

    These two code strings give me this error: “‘baseUrl’ is not defined”

    I suppose WP doesnt know this command and I should replace it with something else, but I am clueless. Searched the web for several hours and no answers anywhere. ?? I have also contacted the plugin maker, but its DIY and I dont think they will be able to answer my question.

    Thank you all for help and wish you happy New year! ??

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘‘baseUrl’ is not defined’ is closed to new replies.