繁体   English   中英

如何修复LiveChatInc语法错误?

[英]How do I fix LiveChatInc syntax error?

在Chrome中,我正在纠正此错误: SyntaxError: Unexpected identifier on line 1 _https://secure.livechatinc.com/licence/ (mylicense) /script.cgi?lang=zh-CN&groups=0的SyntaxError: Unexpected identifier on line 1

错误

该脚本的响应为:

LIVECHAT Control Server xxxxxx (May 26 2015)

这是添加script.cgi文件的脚本

<script type="text/javascript">
  //<![CDATA[
    (function() {
      var license = 'mylicense',
          params = '',
          lang = 'en',
          skill = '0';

      __lc_load = function (p) { if (typeof __lc_loaded != 'function')
        if (p) { var d = document, l = d.createElement('script'), s = d.getElementsByTagName('script')[0], a = unescape('%26'),
          h = ('https:' == d.location.protocol ? 'https://' : 'http://'); l.type = 'text/javascript'; l.async = true;
          l.src = h + 'gis' + p +'.livechatinc.com/gis.cgi?serverType=control'+a+'licenseID='+license+a+'jsonp=__lc_load';
          if (typeof p['server'] == 'string' && typeof __lc_serv != 'string') {
            l.src = h + (__lc_serv = p['server']) + '/licence/'+license+'/script.cgi?lang='+lang+a+'groups='+skill;
            l.src += (params == '') ? '' : a+'params='+encodeURIComponent(encodeURIComponent(params)); s.parentNode.insertBefore(l, s);
          } else setTimeout(__lc_load, 1000); typeof __lc_serv != 'string' && s.parentNode.insertBefore(l, s);
        } else __lc_load(Math.ceil(Math.random()*5)); }
      __lc_load();
    })();
  //]]>
  </script>

插入的代码是:

<script type="text/javascript" async="" src="https://secure.livechatinc.com/licence/mylicense/script.cgi?lang=en&amp;groups=0"></script>

我在LiveChat工作,并且检查了此问题。 我注意到您使用的是旧代码,这可能就是问题的原因。 请尝试从这里获取新的: https : //my.livechatinc.com/settings/code

这应该会有所帮助,但是如果您有任何问题,可以访问我们的网站并与我们聊天:)

问候!

Agnieszka / LiveChat

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM