Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Ниже содержится информация о том, как добавить виджет на сайт в виде ссылки или кнопки, как скрыть значок виджета на странице, а также как открыть отобразить виджет на весь экран. 

Как открыть виджет с помощью кнопки или по ссылке

...

HTML
<div id="my-chat-container"></div>
        <button onclick="TwinClient.open(); return false;">Open Chat</button>
        <p><a href='#' onclick="TwinClient.open(); return false;">Open Chat</a></p>
        <script>(function () {
            const script = document.createElement("script");
            script.async = true;
            script.src = "https://tcl.twin24.ai/widget/v3/manual.umd.min.js";
            document.head.appendChild(script);
            script.onload = () => {
              TChat.init("#my-chat-container", {
                chatId: "8eb533e5-9c91-48ae-bb38-b02e359033b4"
              }).then((client) => (window.TChatClient = client));
            };
            })();
        </script>
        <style>.twin-chat .twc-chat-full-wrapper {
            width: 100%;
            height: 100%;
            bottom: 0;
            right: 0;
            z-index: 1000000;
            }
            .twin-chat .twc-chat-full-wrapper .twc-chat-full {
            width: 100%;
            height: 100%;
            border-radius: 0;
            }
            .twin-chat .twc-button-type {
            display: none;
            } 
        </style>
          
    </body>


Button Hyperlink
custom-icontop-button
idtop-button
title.
typestandard
classtop-button
url#Top