From 9aa25317002c2b51d3e89ab792965edbc52196a1 Mon Sep 17 00:00:00 2001 From: nstCactus Date: Thu, 2 Apr 2020 11:59:28 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20Facil'ITI=20service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tarteaucitron.services.js | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 493f9a1..cd6f7bb 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1699,7 +1699,7 @@ tarteaucitron.services.rumbletalk = { var width = tarteaucitron.getElemWidth(x), height = tarteaucitron.getElemHeight(x), id = x.getAttribute("data-id"); - + return '
'; }); }, @@ -1709,7 +1709,7 @@ tarteaucitron.services.rumbletalk = { tarteaucitron.fallback(['rumbletalk'], function (elem) { elem.style.width = tarteaucitron.getElemWidth(elem) + 'px'; elem.style.height = tarteaucitron.getElemHeight(elem) + 'px'; - + return tarteaucitron.engage(id); }); } @@ -3004,3 +3004,27 @@ tarteaucitron.services.youtubeapi = { tarteaucitron.addScript('https://www.youtube.com/player_api'); } }; + +// Facil'ITI +tarteaucitron.services.faciliti = { + "key": "faciliti", + "type": "other", + "name": "Facil'ITI", + "uri": "https://ws.facil-iti.com/mentions-legales.html", + "needConsent": true, + "cookies": ['FACIL_ITI_LS'], + "js": function () { + "use strict"; + if (tarteaucitron.user.facilitiID === undefined) { + return; + } + + (function(w, d, s, f) { + w[f] = w[f] || {conf: function () { (w[f].data = w[f].data || []).push(arguments);}}; + var l = d.createElement(s), e = d.getElementsByTagName(s)[0]; + l.async = 1; l.src = 'https://ws.facil-iti.com/tag/faciliti-tag.min.js'; e.parentNode.insertBefore(l, e); + }(window, document, 'script', 'FACIL_ITI')); + FACIL_ITI.conf('userId', tarteaucitron.user.facilitiID); + } +}; +