Merge pull request #841 from jfriviere/master

Add Gallica to services
This commit is contained in:
Amauri CHAMPEAUX 2021-12-22 11:17:43 +01:00 committed by GitHub
commit a704258b85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 0 deletions

View File

@ -5000,3 +5000,35 @@ tarteaucitron.services.mtcaptcha = {
tarteaucitron.addScript('https://service2.mtcaptcha.com/mtcv1/client/mtcaptcha2.min.js'); 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 = '<iframe style="'+ style + '" src="' + src + '"></iframe>';
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);
});
}
};