MediaWiki:Common.js: Diferență între versiuni
(DSVGO) |
|||
Linia 2: | Linia 2: | ||
$('div#content').append( "<div class='content-footer'></div>" ); | $('div#content').append( "<div class='content-footer'></div>" ); | ||
+ | |||
+ | (function () { | ||
+ | var req = new XMLHttpRequest(); | ||
+ | req.addEventListener('load', function (ev) { | ||
+ | if (this.status >= 200 && this.status < 300) { | ||
+ | var data = JSON.parse(this.responseText); | ||
+ | if (data.hasOwnProperty('version')) { | ||
+ | var gdpr = document.createElement("script"); | ||
+ | gdpr.src = "https://s3-static.geo.gfsrv.net/cookiebanner/" + data.version + "/cookie.min.js"; | ||
+ | document.head.appendChild(gdpr); | ||
+ | } | ||
+ | } | ||
+ | }); | ||
+ | req.open('GET', "https://s3-static.geo.gfsrv.net/cookiebanner/version.json"); | ||
+ | req.send(); | ||
+ | })(); |
Versiunea de la data 14 august 2018 09:57
/* Any JavaScript here will be loaded for all users on every page load. */
$('div#content').append( "<div class='content-footer'></div>" );
(function () {
var req = new XMLHttpRequest();
req.addEventListener('load', function (ev) {
if (this.status >= 200 && this.status < 300) {
var data = JSON.parse(this.responseText);
if (data.hasOwnProperty('version')) {
var gdpr = document.createElement("script");
gdpr.src = "https://s3-static.geo.gfsrv.net/cookiebanner/" + data.version + "/cookie.min.js";
document.head.appendChild(gdpr);
}
}
});
req.open('GET', "https://s3-static.geo.gfsrv.net/cookiebanner/version.json");
req.send();
})();