[ad_1]
Man denkt sich, ein spezieller Schadensfall ist von der Versicherungspolizze gedeckt – weil man sich darüber informiert und von der Versicherung eine entsprechende Auskunft erhalten hat. Dann tritt ein solcher Schaden ein. Die Versicherung zahlt aber nicht, sondern schickt nach Meldung des Schadens eine neue Polizze zu, in der die Haftung für den Schadensfall beschränkt wird.
executeAsyncScript: function(name) {
this._allowedScriptNames.push(name); // If handleAsyncScript is called after executeAsyncScript, callback will be executed immediately
if (this.scripts[name]) {
this.scripts[name]();
delete this.scripts[name];
}
}
};
window.LR = LR;
LR.getMixedConsentData = function(purposeIds = null, vendorIds = []) {
return new Promise(function (resolve) {
let gotPurposes = false;
let gotVendors = false;
let out = {
purposeConsents: [],
vendorConsents: []
};
window.__tcfapi('consentDataExist', 2, function(dataExists) {
if(dataExists === true) {
sendConsents();
} else {
sendNotSets();
}
});
function sendNotSets() {
// Purposes
for(let i=1; i<=30; i++) {
out.purposeConsents.push({purposeId: i, hasConsent: false, asString: 'not-set'});
}
// Vendors
vendorIds.forEach(function (id) {
out.vendorConsents.push({vendorId: id, hasConsent: false, asString: 'not-set'});
})
}
function sendConsents() {
function checkResolve() {
if (gotPurposes && gotVendors) {
resolve(out);
}
}
window.__tcfapi('getFullTCData', 2, function (tcData) {
const consentData = tcData.purpose.consents;
for (let purpose in consentData) {
if (purposeIds === null || purposeIds.indexOf(parseInt(purpose)) !== -1) {
out.purposeConsents.push({purposeId: parseInt(purpose), hasConsent: consentData[purpose], asString: consentData[purpose].toString()});
}
}
gotPurposes = true;
checkResolve();
});
let dataObj = vendorIds.map(function (id) {
return {
vendorId: id
}
});
window.__tcfapi('checkConsent', 2, function (data) {
out.vendorConsents = data.map(function (v) {
v.asString = v.hasConsent.toString();
return v;
});
gotVendors = true;
checkResolve();
}, {
data: dataObj,
recheckConsentOnChange: false,
perVendor: true
});
}
});
}
function allCookiesBlocked() {
if((navigator.cookieEnabled && window.__tcfapi) || ((navigator.cookieEnabled !== false && navigator.cookieEnabled !== true) && window.__tcfapi)) {
return false;
} else {
return true;
}
}
function executeTCFScripts() {
LR.executeAsyncScript('smart');
LR.executeAsyncScript('1plusX');
}
window.__tcfapi('consentDataExist', 2, function(dataExists) {
if (dataExists === true) {
LR.consentDataExist = true;
executeTCFScripts();
}
});
window.__tcfapi('addEventListener', 2, (data, success) => {
if (!UTIL.loaded.chartbeat) {
loadChartbeat();
}
window.__tcfapi('addEventListener', 2, (data, success) => {
// wait for content html to render before running script
window.setTimeout(() => {
LR.executeSocialMediaQueue();
}, 500);
// Won't do anything if already called in 'consentDataExist'
executeTCFScripts();
}, 'consentChanged');
}, 'cmpReady');
LR.checkConsentAndAddtoQueue = (vendor, cb) => {
// only put into queue if it's not already in there.
window.__tcfapi('checkConsent', 2, (consentOK) => {
if (window.LR.socialMediaQueue.find(element => element.id === vendor.id)) {
window.LR.socialMediaQueue.find(element => element.id === vendor.id)['consentOK'] = consentOK;
} else {
vendor['consentOK'] = consentOK;
window.LR.socialMediaQueue.push(vendor);
}
if (consentOK) {
cb(true);
} else {
cb(false);
}
}, {
data: [{
vendorId: vendor.id
}],
recheckConsentOnChange: true // rechecking is done by onConsentChange listener on checkConsents
});
};
// TODO: find a method how to know if and when Vue is done rendering so we don't have to use a derky timeout
// initial: execute additional social media embed scripts if necessary. - wait for Vue to render
window.setTimeout(() => {
LR.executeSocialMediaQueue();
}, 6000);
const socialMedia = {
'Facebook': {
source: 'https://connect.facebook.net/en_US/sdk.js',
onLoad: () => {
window.fbAsyncInit = function() {
FB.init({
appId : '579158667063181',
autoLogAppEvents : true,
xfbml : true,
version : 'v16.0'
});
};
},
},
'Twitter': {
source: 'https://platform.twitter.com/widgets.js',
},
'Instagram': {
source: 'https://www.instagram.com/embed.js',
onLoad: () => {
window['instgrm'].Embeds.process();
},
},
'TikTok': {
source: 'https://www.tiktok.com/embed.js',
},
'Reddit': {
source: 'https://embed.redditmedia.com/widgets/platform.js',
},
'Pinpoll': {
source: 'https://tools.pinpoll.com/global.js',
},
};
LR.executeSocialMediaQueue = () => {
for (const vendor of window.LR.socialMediaQueue) {
if (vendor.consentOK === true) {
if (socialMedia[vendor.name]) {
window['UTIL'].loadScript({
src: socialMedia[vendor.name].source,
onLoad: () => {
if (socialMedia[vendor.name].onLoad
&& typeof socialMedia[vendor.name].onLoad === 'function'
) {
socialMedia[vendor.name].onLoad();
}
},
});
}
}
}
};
[ad_2]
Source link