Merge branch 'master' into master

This commit is contained in:
Amauri CHAMPEAUX 2021-08-30 10:38:04 +02:00 committed by GitHub
commit 28f65af3fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 660 additions and 316 deletions

View File

@ -480,8 +480,10 @@ tarteaucitron.services.metrica = {
}
tarteaucitron.addScript('https://mc.yandex.ru/metrika/tag.js', '', function () {
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(function (m, e, t, r, i, k, a) {
m[i] = m[i] || function () { (m[i].a = m[i].a || []).push(arguments) };
m[i].l = 1 * new Date(); k = e.createElement(t), a = e.getElementsByTagName(t)[0], k.async = 1, k.src = r, a.parentNode.insertBefore(k, a)
})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(tarteaucitron.user.yandexmetrica, "init", {
@ -2500,6 +2502,67 @@ tarteaucitron.services.purechat = {
}
};
// Intercom
tarteaucitron.services.intercomChat = {
"key": "intercomChat",
"type": "support",
"name": "Intercom",
"uri": "https://www.intercom.com/",
"needConsent": true,
"cookies": [
"intercom-id-" + tarteaucitron.user.intercomKey,
"intercom-session-" + tarteaucitron.user.intercomKey,
],
"readmoreLink": "https://www.intercom.com/legal/privacy",
"js": function () {
window.intercomSettings = {
app_id: tarteaucitron.user.intercomKey,
};
var w = window;
var ic = w.Intercom;
if (typeof ic === "function") {
ic("reattach_activator");
ic("update", w.intercomSettings);
} else {
var i = function () {
i.c(arguments);
};
i.q = [];
i.c = function (args) {
i.q.push(args);
};
w.Intercom = i;
tarteaucitron.addScript(
"https://widget.intercom.io/widget/" + tarteaucitron.user.intercomKey,
"",
function () {
// Execute callback if function `intercomChatEnable`
// is defined
if (typeof intercomChatEnable === 'function') {
intercomChatEnable()
}
},
);
}
},
"fallback": function () {
"use strict";
var id = "intercomChat";
tarteaucitron.fallback(
["intercom-chat"],
function () {
// Execute callback if function `intercomChatDisable`
// is defined
if (typeof intercomChatDisable === 'function') {
intercomChatDisable()
}
return tarteaucitron.engage(id)
}
);
},
};
// rumbletalk
tarteaucitron.services.rumbletalk = {
"key": "rumbletalk",
@ -3464,11 +3527,13 @@ tarteaucitron.services.youtube = {
allowfullscreen = tarteaucitron.getElemAttr(x, "allowfullscreen"),
attrs = ["theme", "rel", "controls", "showinfo", "autoplay", "mute", "start", "loop"],
params = attrs.filter(function (a) {
return tarteaucitron.getElemAttr(x, a) !== null;
}).map(function (a) {
return a + "=" + tarteaucitron.getElemAttr(x, a);
}).join("&");
if (video_id === undefined) {
return "";
}
@ -4374,6 +4439,285 @@ tarteaucitron.services.bandcamp = {
}
};
// Discord Widget
tarteaucitron.services.discord = {
"key": "discord",
"type": "social",
"name": "Discord (Server Widget)",
"needConsent": true,
"cookies": ["__cfruid", "__dcfduid", "_ga", "_gcl_au", "OptanonConsent", "locale", "_gid"],
"uri": "https://discord.com/privacy",
"js": function () {
"use strict";
tarteaucitron.fallback(['discord_widget'], function (x) {
var id = x.getAttribute("guildID"),
width = x.getAttribute("width"),
height = x.getAttribute("height")
var widgetURL = "https://discord.com/widget?id=" + id;
return "<iframe width=\"" + width + "\" height=\"" + height + "\"src=\"https://discord.com/widget?id=" + widgetURL + "\"></iframe>";
});
},
"fallback": function () {
"use strict";
var id = 'discord';
tarteaucitron.fallback(['discord_widget'], function (elem) {
elem.style.width = elem.getAttribute('width') + 'px';
elem.style.height = elem.getAttribute('height') + 'px';
return tarteaucitron.engage(id);
});
}
};
// Google Maps
tarteaucitron.services.maps_noapi = {
"key": "maps_noapi",
"type": "other",
"name": "Google Maps",
"needConsent": true,
"cookies": ["NID", "OGPC", "1P_JAR", "CONSENT"],
"uri": "https://policies.google.com/privacy",
"js": function () {
"use strict";
tarteaucitron.fallback(['googlemaps_embed'], function (x) {
var id = x.getAttribute("id"),
width = x.getAttribute("width"),
height = x.getAttribute("height")
var widgetURL = "https://google.com/maps/embed?pb=" + id;
return "<iframe width=\"" + width + "\" height=\"" + height + "\"src=\"" + widgetURL + "\" style=\"border:0;\" allowfullscreen=\"\" loading=\"lazy\"></iframe>";
});
},
"fallback": function () {
"use strict";
var id = 'maps_noapi';
tarteaucitron.fallback(['googlemaps_embed'], function (elem) {
elem.style.width = elem.getAttribute('width') + 'px';
elem.style.height = elem.getAttribute('height') + 'px';
return tarteaucitron.engage(id);
});
}
};
// hCaptcha
tarteaucitron.services.hcaptcha = {
"key": "hcaptcha",
"type": "other",
"name": "hCaptcha",
"needConsent": true,
"cookies": [],
"uri": "https://www.hcaptcha.com/privacy",
"js": function () {
"use strict";
tarteaucitron.fallback(["h-captcha"], '');
tarteaucitron.addScript("https://hcaptcha.com/1/api.js", "hcaptcha")
},
"fallback": function () {
"use strict";
var id = "hcaptcha";
tarteaucitron.fallback(["h-captcha"], tarteaucitron.engage(id));
}
};
// France Culture
tarteaucitron.services.fculture = {
"key": "fculture",
"type": "video",
"name": "France Culture",
"needConsent": true,
"cookies": ["_gid", "didomi_token", "outbrain_cid_fetch", "xtvrn", "xtant", "YSC", "ABTasty", "xtan", "ABTastySession", "xtidc", "_ga", "VISITOR_INFO1_LIVE", "euconsent-v2", "v1st", "dmvk", "ts", "VISITOR_INFO1_LIVE", "YSC"],
"uri": "https://www.radiofrance.com/politique-d-utilisation-des-cookies-sur-les-sites-internet-du-groupe-radio-france",
"js": function () {
"use strict";
tarteaucitron.fallback(['fculture_embed'], function (x) {
var id = x.getAttribute('id'),
width = x.getAttribute('width'),
height = x.getAttribute('height');
return "<iframe src=\"https://www.franceculture.fr/player/export-reecouter?content=" + id + "\" height=\"" + height + "\" width=\"" + width + "\"></iframe>"
});
},
"fallback": function () {
"use strict";
var id = "fculture";
tarteaucitron.fallback(["fculture_embed"], tarteaucitron.engage(id));
}
};
// Acast
tarteaucitron.services.acast = {
"key": "acast",
"type": "video",
"name": "Acast",
"needConsent": true,
"cookies": ["intercom-id-ayi0335i", "intercom-session-ayi0335i"],
"uri": "https://www.acast.com/en/privacy",
"js": function () {
"use strict";
tarteaucitron.fallback(['acast_embed'], function (x) {
var id = x.getAttribute('id1'),
id2 = x.getAttribute('id2'),
width = x.getAttribute('width'),
height = x.getAttribute('height'),
seek = x.getAttribute('seek');
var widgetURL = "https://embed.acast.com/" + id + "/" + id2 + "?seek=" + seek;
return "<iframe title=\"Embed Player\" width=" + width + " height=" + height + " src=" + widgetURL + " scrolling=\"no\" frameBorder=\"0\" style=\"border: none; overflow: hidden;\"></iframe>";
});
},
"fallback": function () {
"use strict";
var id = "acast";
tarteaucitron.fallback(["acast_embed"], tarteaucitron.engage(id));
}
};
// Mixcloud
tarteaucitron.services.mixcloud = {
"key": "mixcloud",
"type": "video",
"name": "Mixcloud",
"needConsent": true,
"cookies": ["UID", "_gat", "__stripe_mid", "_gid", "_ga", "c", "csrftoken", "__stripe_sid", "mx_t"],
"uri": "https://www.mixcloud.com/privacy/",
"js": function () {
"use strict";
tarteaucitron.fallback(['mixcloud_embed'], function (x) {
var id = x.getAttribute('id'),
hidecover = x.getAttribute('hidecover'),
mini = x.getAttribute('mini'),
light = x.getAttribute('light'),
width = x.getAttribute('width'),
height = x.getAttribute('height');
return "<iframe width=\"" + width + " height=\"" + height + "\" src=\"https://www.mixcloud.com/widget/iframe/?hide_cover=" + hidecover + "&mini=" + mini + "&light=" + light + "&feed=" + id + "\" frameborder=\"0\" ></iframe>";
});
},
"fallback": function () {
"use strict";
var id = "mixcloud";
tarteaucitron.fallback(["mixcloud_embed"], tarteaucitron.engage(id));
}
};
// Google Agenda
tarteaucitron.services.gagenda = {
"key": "gagenda",
"type": "other",
"name": "Google Agenda",
"needConsent": true,
"cookies": ["CONSENT", "NID"],
"uri": "https://policies.google.com/privacy",
"js": function () {
"use strict";
tarteaucitron.fallback(['gagenda_embed'], function (x) {
var calendar_data = x.getAttribute('data'),
width = x.getAttribute('width'),
height = x.getAttribute('height');
return "<iframe loarding=\"lazy\" width=\"" + width + "\" height=\"" + height + "\" src=\"https://www.google.com/calendar/embed?" + calendar_data + "\" frameborder=\"0\" scrolling=\"no\" style=\"border-width:0\"></iframe>";
});
},
"fallback": function () {
"use strict";
var id = "gagenda";
tarteaucitron.fallback(["gagenda_embed"], tarteaucitron.engage(id));
}
};
// Google Docs
tarteaucitron.services.gdocs = {
"key": "gdocs",
"type": "other",
"name": "Google Docs",
"needConsent": true,
"cookies": ["CONSENT", "NID"],
"uri": "https://policies.google.com/privacy",
"js": function () {
"use strict";
tarteaucitron.fallback(['gdocs_embed'], function (x) {
var id = x.getAttribute('id'),
width = x.getAttribute('width'),
height = x.getAttribute('height');
return "<iframe width=" + width +" height=" + height + " src=\"https://docs.google.com/document/d/e/" + id + "/pub?embedded=true\"></iframe>";
});
},
"fallback": function () {
"use strict";
var id = "gdocs";
tarteaucitron.fallback(["gdocs_embed"], tarteaucitron.engage(id));
}
};
// Google Sheets
tarteaucitron.services.gsheets = {
"key": "gsheets",
"type": "other",
"name": "Google Sheets",
"needConsent": true,
"cookies": ["CONSENT", "NID"],
"uri": "https://policies.google.com/privacy",
"js": function () {
"use strict";
tarteaucitron.fallback(['gsheets_embed'], function (x) {
var id = x.getAttribute('id'),
width = x.getAttribute('width'),
height = x.getAttribute('height'),
headers = x.getAttribute('headers');
return "<iframe width=\"" + width + "\" height=\"" + height + "\" src=\"https://docs.google.com/spreadsheets/d/e/" + id + "/pubhtml?widget=true&amp;headers=\"" + headers + "\"></iframe>";
});
},
"fallback": function () {
"use strict";
var id = "gsheets";
tarteaucitron.fallback(["gsheets_embed"], tarteaucitron.engage(id));
}
};
// Google Slides
tarteaucitron.services.gslides = {
"key": "gslides",
"type": "other",
"name": "Google Slides",
"needConsent": true,
"cookies": ["CONSENT", "NID"],
"uri": "https://policies.google.com/privacy",
"js": function () {
"use strict";
tarteaucitron.fallback(['gslides_embed'], function (x) {
var id = x.getAttribute('id'),
width = x.getAttribute('width'),
height = x.getAttribute('height'),
autostart = x.getAttribute('autostart'),
loop = x.getAttribute('loop'),
delay = x.getAttribute('delay');
return "<iframe width=" + width + " height=" + height + " src=\"https://docs.google.com/presentation/d/e/" + id + "/embed?start=\"" + autostart + "&loop=\"" + loop + "&delayms=\"" + delay + " frameborder=\"0\" allowfullscreen=\"true\" mozallowfullscreen=\"true\" webkitallowfullscreen=\"true\"></iframe>";
});
},
"fallback": function () {
"use strict";
var id = "gslides";
tarteaucitron.fallback(["gslides_embed"], tarteaucitron.engage(id));
}
};
// Google Forms
tarteaucitron.services.gforms = {
"key": "gforms",
"type": "other",
"name": "Google Forms",
"needConsent": true,
"cookies": ["CONSENT", "NID"],
"uri": "https://policies.google.com/privacy",
"js": function () {
"use strict";
tarteaucitron.fallback(['gforms_embed'], function (x) {
var id = x.getAttribute('id'),
width = x.getAttribute('width'),
height = x.getAttribute('height');
return "<iframe width=" + width + " height=" + height + "src=\"https://docs.google.com/forms/d/e/" + id + "/viewform?embedded=true\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\"></iframe>";
});
},
"fallback": function () {
"use strict";
var id = "gforms";
tarteaucitron.fallback(['gforms_embed'], tarteaucitron.engage(id));
}
}
// Marketo munchkin
tarteaucitron.services.marketomunchkin = {
"key": "marketomunchkin",
@ -4406,4 +4750,4 @@ tarteaucitron.services.marketomunchkin = {
s.onload = initMunchkin;
document.getElementsByTagName('head')[0].appendChild(s);
}
};
}