瀏覽代碼

Add CollectChat fix #1030

Amauri CHAMPEAUX 2 年之前
父節點
當前提交
333d6c5005
共有 1 個文件被更改,包括 21 次插入0 次删除
  1. 21 0
      tarteaucitron.services.js

+ 21 - 0
tarteaucitron.services.js

@@ -32,6 +32,27 @@ tarteaucitron.services.iframe = {
     }
 };
 
+// collectchat
+tarteaucitron.services.collectchat = {
+    "key": "collectchat",
+    "type": "other",
+    "name": "Collect Chat",
+    "uri": "https://collect.chat/privacy/",
+    "needConsent": true,
+    "cookies": [],
+    "js": function () {
+        "use strict";
+
+        if (tarteaucitron.user.collectchatId === undefined) {
+            return;
+        }
+
+        window.CollectId = tarteaucitron.user.collectchatId;
+
+        tarteaucitron.addScript('https://collectcdn.com/launcher.js');
+    }
+};
+
 // eulerian
 tarteaucitron.services.eulerian = {
     "key": "eulerian",