How to show, hide Re:plain on particular pages, devices, or by an event.

General code structure
You can set global settings of chat in the code. Those are: showChat, excludePages, includePages, openChatAfterPageLoad. Each of them are shown below.
<script>
window.replainSettings = {
  id: '<Here's your ID. You've got it in your messenger>',
  showChat: <trigger value>,
  excludePages: <list of pages value>,
  includePages: <list of pages value>,
  openChatAfterPageLoad: <yes or no value>,
};
(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
})('https://widget.replain.cc/dist/client.js');
</script>
How to make a link, when you click on which, the chat will immediately open?
— You need Click to chat add-on.
— The link must content: #open-chat
window.replainSettings = {
  id: '<ID>',
  openChatAfterPageLoad: location.hash === '#open-chat',
};
Example of the code that you have to place on your website:

https://replain.cc/#open-chat
<script>
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  openChatAfterPageLoad: location.hash === '#open-chat',
};
(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
})('https://widget.replain.cc/dist/client.js');
</script>
How to hide chat on particular pages?
The chat will be hidden on /news, /articles, /blogs
window.replainSettings = {
  id: '<ID>',
  excludePages: ['/news', '/articles', '/blogs'],
};
Example of the code that you have to place on your website:
<script>
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  excludePages: ['/news', '/articles', '/blogs'],
};
(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
})('https://widget.replain.cc/dist/client.js');
</script>
How to show chat ONLY on particular pages?
The chat will be shown only on the Main and /contacts
window.replainSettings = {
  id: '<ID>',
  includePages: ['/',  '/contacts'],
};
Example of the code that you have to place on your website:
<script>
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  includePages: ['/',  '/contacts'],
};
(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
})('https://widget.replain.cc/dist/client.js');
</script>
How to show chat on particular website sections?
The chat will be shown on all pages followed after /de and /catalog
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  includePages: ['/de*', '/catalog*'],
};
Example of the code that you have to place on your website:
<script>
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  includePages: ['/de*', '/catalog*'],
};
(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
})('https://widget.replain.cc/dist/client.js');
</script>
[For the skilled users]
How to show/hide chat on particular pages dynamically depending on website settings?
— To hide chat set for showChat value false
— To show chat set for showChat value true
window.replainSettings = {
  id: '<ID>',
  showChat: false, 
};
Example of the code that you have to place on your website:
<script>
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  showChat: false, 
};
(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
})('https://widget.replain.cc/dist/client.js');
</script>
How to open chat window right after page load?
You need Click to chat add-on
window.replainSettings = {
  id: '<ID>',
  openChatAfterPageLoad: true,
};
Example of the code that you have to place on your website:
<script>
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  openChatAfterPageLoad: true,
};
(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
})('https://widget.replain.cc/dist/client.js');
</script>
How to open chat window in a particular time after page load?
— You need Click to chat add-on.
— Chat window will be opened in a 10 seconds
— Example of the code that you have to place on your website сright after Re:plain's basic widget code.
<script>
var showReplainTimeout = 10;

setTimeout(function showReplain() {
  window.ReplainAPI('open');
}, showReplainTimeout * 1000);
</script>
How to show chat on a desktop only?
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  showChat: !('ontouchstart' in window || navigator.maxTouchPoints), 
};
Example of the code that you have to place on your website:
<script>
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  showChat: !('ontouchstart' in window || navigator.maxTouchPoints), 
};
(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
})('https://widget.replain.cc/dist/client.js');
</script>
How to show chat on mobile devices only?
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  showChat: 'ontouchstart' in window || navigator.maxTouchPoints > 0
};
Example of the code that you have to place on your website:
<script>
window.replainSettings = {
  id: 'b32e602b-4c07-41df-b37f-a2e769edc0b5',  //Here your own ID from your messenger must be placed
  showChat: 'ontouchstart' in window || navigator.maxTouchPoints > 0
};
(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
})('https://widget.replain.cc/dist/client.js');
</script>
How to place two or more Replain codes on one website?
window.replainSettings = [
      {
        id: '<ID>',
        includePages: ['/', '/news'],
      },
      {
        id: '<ID>',
        includePages: ['/', '/blogs'],
      }
    ];
Example of the code that you have to place on your website:
<script>
window.replainSettings = [
      {
        id: '47f02936-f598-4068-ba5d-8776812930fc',  //Here your own ID from your messenger must be placed
        includePages: ['/', '/news'],
      },
      {
        id: 'fe6fc03b-f30e-4ce1-b2e2-50f97bad4bde',  //Here your own ID from your messenger must be placed
        includePages: ['/blogs'],
      }
    ];
(function (u) {var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = u; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); })('https://widget.replain.cc/dist/client.js');
</script>
Select preferred messenger
Re:plain works perfectly either in WhartsApp, Facebook Messenger or in Telegram. Please, select the preferred one.