隐藏 Zendesk 聊天按钮可打开聊天 window。任何修复?

Hiding Zendesk chat button opens chat window. Any fix?

我有一个 url 我想隐藏 Zendesk 聊天按钮。查看他们的 documentation 我发现我需要使用 hideAll() 函数。为此,我创建了:

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

但是,这不会隐藏按钮 - 而是会在页面加载时打开聊天 window。

有人知道我可以做些什么来简单地隐藏 Zen Desk 聊天按钮吗?

(PS currentPath 有效,我只是没有在此处包含该函数以节省空间。我可以 console.log 在 if 语句中很好。)

hideAll() 函数确实有效,我只需要将它应用于所有内容,例如:

$zopim.livechat.hideAll();

不是:

$zopim.livechat.button.hideAll();