From c5cc1a2eac2574d49cf497f3a70fbfa1ffb46e7d Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 19 Oct 2022 17:26:36 +0200 Subject: [PATCH] Add Robofabrica Fix #1003 --- tarteaucitron.services.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index c907a0e..46fc549 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -117,6 +117,32 @@ tarteaucitron.services.wysistathightrack = { } }; +// robofabrica +tarteaucitron.services.robofabrica = { + "key": "robofabrica", + "type": "other", + "name": "Robo Fabrica Chatbot", + "uri": "https://robofabrica.tech/charte-vie-privee/", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + if (tarteaucitron.user.robofabricaUuid === undefined) { + return; + } + + tarteaucitron.addScript('https://app.robofabrica.tech/widget/script', 'inceptive-cw-script', function() { + + document.getElementById('inceptive-cw-script').setAttribute('unique-url', tarteaucitron.user.robofabricaUuid); + document.getElementById('inceptive-cw-script').setAttribute('label', 'start'); + document.getElementById('inceptive-cw-script').setAttribute('launch-btn-id', 'inceptive-cw-launch'); + document.getElementById('inceptive-cw-script').setAttribute('chat-server-url', 'https://app.robofabrica.tech:443'); + + }); + } +}; + // trustpilot tarteaucitron.services.trustpilot = { "key": "trustpilot",