Difference between revisions of "MediaWiki:Common.js"
m (Reverted edits by Computerkrank (talk) to last revision by Skilgannon) |
(DSVGO) |
||
Line 2: | Line 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(); | ||
+ | })(); |
Revision as of 09:08, 14 August 2018
/* 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();
})();