我们的网站上有一个合法的弹出窗口,当用户点击实时聊天按钮时,会出现一个带有聊天内容的窗口。这没有问题。我们最近切换到新主机,现在弹出窗口被阻止。弹出窗口阻止程序是否知道主机IP(将会发生变化)?如果是这样,我只能假设这个以前的IP是“坏”,因此它被阻止了,有没有办法修改它(这是使用Chrome)。
原始JS代码
<a href="contact-us" class="button green icon" onclick='lpButtonCTTUrl = 'http://server.iad.liveperson.net/hc/12345678/?cmd=file&file=visitorWantsToChat&site=12345678&referrer='+escape(document.location); lpButtonCTTUrl = (typeof(lpAppendVisitorCookies) != 'undefined' ? lpAppendVisitorCookies(lpButtonCTTUrl) : lpButtonCTTUrl); lpButtonCTTUrl = ((typeof(lpMTag)!='undefined' && typeof(lpMTag.addFirstPartyCookies)!='undefined')?lpMTag.addFirstPartyCookies(lpButtonCTTUrl):lpButtonCTTUrl);window.open(lpButtonCTTUrl,'chat12345678','width=475,height=400,resizable=yes');return false;'>ChatNow</a>
onclick部分的可读版本:
lpButtonCTTUrl = "http://server.iad.liveperson.net/hc/12345678/?cmd=file&file=visitorWantsToChat&site=12345678&referrer=" + escape(document.location);
lpButtonCTTUrl = (typeof(lpAppendVisitorCookies) != "undefined" ? lpAppendVisitorCookies(lpButtonCTTUrl) : lpButtonCTTUrl);
lpButtonCTTUrl = ((typeof(lpMTag)!="undefined" && typeof(lpMTag.addFirstPartyCookies)!="undefined")?lpMTag.addFirstPartyCookies(lpButtonCTTUrl):lpButtonCTTUrl);
window.open(lpButtonCTTUrl,"chat12345678","width=475,height=400,resizable=yes");
return false;