add archive.org
This commit is contained in:
parent
ca3998dbf2
commit
2c9cabdb06
|
|
@ -5001,34 +5001,48 @@ tarteaucitron.services.mtcaptcha = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Gallica
|
// Internet Archive / https://archive.org
|
||||||
tarteaucitron.services.gallica = {
|
tarteaucitron.services.archive = {
|
||||||
"key": "gallica",
|
"key": "archive",
|
||||||
"type": "other",
|
"type": "video",
|
||||||
"name": "Gallica",
|
"name": "Internet Archive",
|
||||||
"uri": "https://gallica.bnf.fr/edit/und/conditions-dutilisation-des-contenus-de-gallica",
|
"uri": "https://archive.org/about/terms.php",
|
||||||
"needConsent": true,
|
"needConsent": true,
|
||||||
"cookies": ['dtCookie', 'dtLatC', 'dtPC', 'dtSa', 'JSESSIONID', 'rxVisitor', 'rxvt', 'xtvrn'],
|
"cookies": ['abtest-identifier','donation-identifier','PHPSESSID','search-inside-XXX'],
|
||||||
"js": function () {
|
"js": function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
tarteaucitron.fallback(['gallica_player'], function (x) {
|
tarteaucitron.fallback(['archive_player'], function (x) {
|
||||||
var src = tarteaucitron.getElemAttr(x, "data-src"),
|
var video_id = tarteaucitron.getElemAttr(x, "data-videoID"),
|
||||||
style = tarteaucitron.getElemAttr(x, "data-style"),
|
video_width = tarteaucitron.getElemAttr(x, "data-width"),
|
||||||
frame;
|
frame_width = 'width=',
|
||||||
if (src === undefined) {
|
video_height = tarteaucitron.getElemAttr(x, "data-height"),
|
||||||
|
frame_height = 'height=',
|
||||||
|
video_frame;
|
||||||
|
|
||||||
|
if (video_id === undefined) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
frame = '<iframe style="'+ style + '" src="' + src + '"></iframe>';
|
if (video_width !== undefined) {
|
||||||
return frame;
|
frame_width += '"' + video_width + '" ';
|
||||||
|
} else {
|
||||||
|
frame_width += '"" ';
|
||||||
|
}
|
||||||
|
if (video_height !== undefined) {
|
||||||
|
frame_height += '"' + video_height + '" ';
|
||||||
|
} else {
|
||||||
|
frame_height += '"" ';
|
||||||
|
}
|
||||||
|
video_frame = '<iframe src="https://archive.org/embed/' + video_id + '" ' + frame_width + frame_height + ' frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>';
|
||||||
|
return video_frame;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
"fallback": function () {
|
"fallback": function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
var id = 'gallica';
|
var id = 'archive';
|
||||||
tarteaucitron.fallback(['gallica_player'], function (elem) {
|
tarteaucitron.fallback(['archive_player'], function (elem) {
|
||||||
elem.style = elem.getAttribute('data-style');
|
elem.style.width = elem.getAttribute('data-width') + 'px';
|
||||||
|
elem.style.height = elem.getAttribute('data-height') + 'px';
|
||||||
return tarteaucitron.engage(id);
|
return tarteaucitron.engage(id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue