window.cookieConsent = {};
// Set window var which dependend scripts can register a listener to
window.cookieConsent.tagmanager = {
stateInternal: 'awaiting_approval',
fallbackText: '',
FallbackTextCssClass: '',
stateListeners: [],
set state(val) {
this.stateInternal = val;
this.stateListeners.forEach(function(listener){
listener(val);
});
},
get state() {
return this.stateInternal;
},
registerListener: function (listener) {
this.stateListeners.push(listener);
}
}
// Set window var which dependend scripts can register a listener to
window.cookieConsent.cxense = {
stateInternal: 'awaiting_approval',
fallbackText: '
Hvorfor kan jeg ikke se dette?
Vi bruger cookies til at komme med de bedste artikelforslag til dig og alle andre læsere.
Da du ikke har godkendt cookies i kategorien marketing, kan vi desværre ikke vise hvad andre læser.
Klik her for at ændre dit svar
',
FallbackTextCssClass: 'cxense_cookie_fallback_text',
stateListeners: [],
set state(val) {
this.stateInternal = val;
this.stateListeners.forEach(function(listener){
listener(val);
});
},
get state() {
return this.stateInternal;
},
registerListener: function (listener) {
this.stateListeners.push(listener);
}
}
// Set window var which dependend scripts can register a listener to
window.cookieConsent.adn = {
stateInternal: 'awaiting_approval',
fallbackText: '',
FallbackTextCssClass: '',
stateListeners: [],
set state(val) {
this.stateInternal = val;
this.stateListeners.forEach(function(listener){
listener(val);
});
},
get state() {
return this.stateInternal;
},
registerListener: function (listener) {
this.stateListeners.push(listener);
}
}
// Set window var which dependend scripts can register a listener to
window.cookieConsent.gpt = {
stateInternal: 'awaiting_approval',
fallbackText: '',
FallbackTextCssClass: '',
stateListeners: [],
set state(val) {
this.stateInternal = val;
this.stateListeners.forEach(function(listener){
listener(val);
});
},
get state() {
return this.stateInternal;
},
registerListener: function (listener) {
this.stateListeners.push(listener);
}
}
// Set window var which dependend scripts can register a listener to
window.cookieConsent.prebid = {
stateInternal: 'awaiting_approval',
fallbackText: '',
FallbackTextCssClass: '',
stateListeners: [],
set state(val) {
this.stateInternal = val;
this.stateListeners.forEach(function(listener){
listener(val);
});
},
get state() {
return this.stateInternal;
},
registerListener: function (listener) {
this.stateListeners.push(listener);
}
}
// Set window var which dependend scripts can register a listener to
window.cookieConsent.adnami = {
stateInternal: 'awaiting_approval',
fallbackText: '',
FallbackTextCssClass: '',
stateListeners: [],
set state(val) {
this.stateInternal = val;
this.stateListeners.forEach(function(listener){
listener(val);
});
},
get state() {
return this.stateInternal;
},
registerListener: function (listener) {
this.stateListeners.push(listener);
}
}
window.addEventListener('CookieInformationConsentGiven', function(event) {
// Handle the allways execute - these are not wrapped in event listener
// Set script in to DOM
var script = document.createElement('script');
script.src = '/js/tagmanager.js?bv=1';
document.head.append(script);
// When we are sure script are loaded - we can set state var to approved which will trigger scripts
// Dependend on this to execute
script.onload = function() {
window.cookieConsent.tagmanager.state = 'approved';
};
// Handle the allways execute - these are not wrapped in event listener
// Add a listener for when a consent is given
// Execute if consent is given for this group or group is set to always_execute
if (CookieInformation.getConsentGivenFor('cookie_cat_marketing')) {
// Set script in to DOM
var script = document.createElement('script');
script.src = '/js/cxense.js?bv=1';
document.head.append(script);
// When we are sure script are loaded - we can set state var to approved which will trigger scripts
// Dependend on this to execute
script.onload = function() {
window.cookieConsent.cxense.state = 'approved';
};
}
else {
window.cookieConsent.cxense.state = 'disapproved';
}
// Handle the allways execute - these are not wrapped in event listener
// Set script in to DOM
var script = document.createElement('script');
script.src = 'https://cdn.adnuntius.com/adn.js?bv=1';
document.head.append(script);
// When we are sure script are loaded - we can set state var to approved which will trigger scripts
// Dependend on this to execute
script.onload = function() {
window.cookieConsent.adn.state = 'approved';
};
// Handle the allways execute - these are not wrapped in event listener
// Add a listener for when a consent is given
// Execute if consent is given for this group or group is set to always_execute
if (CookieInformation.getConsentGivenFor('cookie_cat_marketing')) {
// Set script in to DOM
var script = document.createElement('script');
script.src = 'https://www.googletagservices.com/tag/js/gpt.js?bv=1';
document.head.append(script);
// When we are sure script are loaded - we can set state var to approved which will trigger scripts
// Dependend on this to execute
script.onload = function() {
window.cookieConsent.gpt.state = 'approved';
};
}
else {
window.cookieConsent.gpt.state = 'disapproved';
}
// Handle the allways execute - these are not wrapped in event listener
// Add a listener for when a consent is given
// Execute if consent is given for this group or group is set to always_execute
if (CookieInformation.getConsentGivenFor('cookie_cat_marketing')) {
// Set script in to DOM
var script = document.createElement('script');
script.src = '//cdn.borsen.cloud/scripts/dfp/prebid2.8.0.js?bv=1';
document.head.append(script);
// When we are sure script are loaded - we can set state var to approved which will trigger scripts
// Dependend on this to execute
script.onload = function() {
window.cookieConsent.prebid.state = 'approved';
};
}
else {
window.cookieConsent.prebid.state = 'disapproved';
}
// Handle the allways execute - these are not wrapped in event listener
// Set script in to DOM
var script = document.createElement('script');
script.src = 'https://macro.adnami.io/macro/spec/adsm.macro.e2648cae-daca-4d90-b628-959b3b14cbbd.js?bv=1';
document.head.append(script);
// When we are sure script are loaded - we can set state var to approved which will trigger scripts
// Dependend on this to execute
script.onload = function() {
window.cookieConsent.adnami.state = 'approved';
};
}, false);