简体   繁体   English

隐藏Zendesk聊天按钮可打开聊天窗口。 可以解决吗?

[英]Hiding Zendesk chat button opens chat window. Any fix?

I have a url I would like to hide the Zendesk chat button on. 我有一个网址,我想隐藏Zendesk聊天按钮。 Looking at their documentation I see that I need to use the hideAll() function. 查看他们的文档,我发现我需要使用hideAll()函数。 To that end, I have created: 为此,我创建了:

$zopim(function () {
   if (currentPath === '/mypage') {
      $zopim.livechat.button.hide();
   }
});

However, this does not hide the button - instead it opens the chat window on page load. 但是,这不会隐藏按钮-而是在页面加载时打开聊天窗口。

Would anyone know what I could do to simply hide the Zen Desk chat button? 有人知道我能做些什么来简单地隐藏Zen Desk聊天按钮吗?

(PS the currentPath works, I just haven't included the function in here to save room. I can console.log within the if statement fine.) (请注意,currentPath可以正常工作,我只是没有在此处包含此功能以节省空间。我可以在if语句中使用console.log。)

The hideAll() function did work, I just had to apply it to everything, eg: hideAll()函数确实起作用,我只需要将其应用于所有内容,例如:

$zopim.livechat.hideAll();

Not: 不:

$zopim.livechat.button.hideAll();

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

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