diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 07ab49f..76e6ae5 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -5000,3 +5000,35 @@ tarteaucitron.services.mtcaptcha = { tarteaucitron.addScript('https://service2.mtcaptcha.com/mtcv1/client/mtcaptcha2.min.js'); } }; + +// Gallica +tarteaucitron.services.gallica = { + "key": "gallica", + "type": "other", + "name": "Gallica", + "uri": "https://gallica.bnf.fr/edit/und/conditions-dutilisation-des-contenus-de-gallica", + "needConsent": true, + "cookies": ['dtCookie', 'dtLatC', 'dtPC', 'dtSa', 'JSESSIONID', 'rxVisitor', 'rxvt', 'xtvrn'], + "js": function () { + "use strict"; + tarteaucitron.fallback(['gallica_player'], function (x) { + var src = tarteaucitron.getElemAttr(x, "data-src"), + style = tarteaucitron.getElemAttr(x, "data-style"), + frame; + if (src === undefined) { + return ""; + } + frame = ''; + return frame; + }); + }, + "fallback": function () { + "use strict"; + var id = 'gallica'; + tarteaucitron.fallback(['gallica_player'], function (elem) { + elem.style = elem.getAttribute('data-style'); + return tarteaucitron.engage(id); + }); + } +}; +