-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappliesflag.html
95 lines (91 loc) · 8.83 KB
/
appliesflag.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<html>
<head>
<title>appliesflag.com</title>
<script>
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e,n){var r=n(2);t.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){n(4),function(){if("function"!=typeof window.__tcfapi){var t,e=[],n=window,r=n.document;!n.__tcfapi&&function t(){var e=!!n.frames.__tcfapiLocator;if(!e)if(r.body){var o=r.createElement("iframe");o.style.cssText="display:none",o.name="__tcfapiLocator",r.body.appendChild(o)}else setTimeout(t,5);return!e}()&&(n.__tcfapi=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(!r.length)return e;if("setGdprApplies"===r[0])r.length>3&&2===parseInt(r[1],10)&&"boolean"==typeof r[3]&&(t=r[3],"function"==typeof r[2]&&r[2]("set",!0));else if("ping"===r[0]){var i={gdprApplies:t,cmpLoaded:!1,apiVersion:"2.0"};"function"==typeof r[2]&&r[2](i,!0)}else e.push(r)},n.addEventListener("message",(function(t){var e="string"==typeof t.data,r={};try{r=e?JSON.parse(t.data):t.data}catch(t){}var o=r.__tcfapiCall;o&&n.__tcfapi(o.command,o.parameter,o.version,(function(n,r){var i={__tcfapiReturn:{returnValue:n,success:r,callId:o.callId}};e&&(i=JSON.stringify(i)),t.source.postMessage(i,"*")}))}),!1))}}()},function(t,e,n){var r=n(0),o=n(5).f,i=Function.prototype,c=i.toString,u=/^s*function ([^ (]*)/;r&&!("name"in i)&&o(i,"name",{configurable:!0,get:function(){try{return c.call(this).match(u)[1]}catch(t){return""}}})},function(t,e,n){var r=n(0),o=n(6),i=n(10),c=n(11),u=Object.defineProperty;e.f=r?u:function(t,e,n){if(i(t),e=c(e,!0),i(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(0),o=n(2),i=n(7);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(8),o=n(1),i=r.document,c=o(i)&&o(i.createElement);t.exports=function(t){return c?i.createElement(t):{}}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(9))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(1);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(1);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}}]);
</script>
<script>
(function () { var e = false; var c = window; var t = document; function r() { if (!c.frames["__uspapiLocator"]) { if (t.body) { var a = t.body; var e = t.createElement("iframe"); e.style.cssText = "display:none"; e.name = "__uspapiLocator"; a.appendChild(e) } else { setTimeout(r, 5) } } } r(); function p() { var a = arguments; __uspapi.a = __uspapi.a || []; if (!a.length) { return __uspapi.a } else if (a[0] === "ping") { a[2]({ gdprAppliesGlobally: e, cmpLoaded: false }, true) } else { __uspapi.a.push([].slice.apply(a)) } } function l(t) { var r = typeof t.data === "string"; try { var a = r ? JSON.parse(t.data) : t.data; if (a.__cmpCall) { var n = a.__cmpCall; c.__uspapi(n.command, n.parameter, function (a, e) { var c = { __cmpReturn: { returnValue: a, success: e, callId: n.callId } }; t.source.postMessage(r ? JSON.stringify(c) : c, "*") }) } } catch (a) { } } if (typeof __uspapi !== "function") { c.__uspapi = p; __uspapi.msgHandler = l; c.addEventListener("message", l, false) } })();
</script>
<script>
window._sp_queue = [];
window._sp_ = {
config: {
accountId: 1584,
baseEndpoint: 'https://cdn.privacy-mgmt.com',
gdpr: {
consentLanguage: "en"
},
propertyHref: 'https://gdprapplies.com',
events: {
onMessageReady: function (message_type) {
console.log('onMessageReady', message_type)
},
onMessageChoiceSelect: function (message_type, choice_id, choice_type_id) {
console.log('onMessageChoiceSelect message_type: ', message_type);
console.log('onMessageChoiceSelect choice_id: ', choice_id);
console.log('onMessageChoiceSelect choice_type_id: ', choice_type_id);
},
onPrivacyManagerAction: function (message_type, pmData) {
console.log('onPrivacyManagerAction message_type:', message_type);
console.log('onPrivacyManagerAction', pmData)
},
onMessageChoiceError: function (message_type, err) {
console.log('onMessageChoiceError', message_type);
console.log('onMessageChoiceError', err)
},
onConsentReady: function (message_type, consentUUID, euconsent) {
console.log('onConsentReady', message_type);
console.log('consentUUID', consentUUID)
console.log('euconsent', euconsent)
},
onPMCancel: function (message_type) {
console.log('onPMCancel', message_type)
},
onMessageReceiveData: function (message_type, data) {
console.log('onMessageReceiveData', message_type);
console.log('onMessageReceiveData', data)
console.log(JSON.stringify(data));
},
onSPPMObjectReady: function () {
console.log('onSPPMObjectReady')
},
onError: function (message_type, errorCode, errorObject, userReset){
console.log('errorCode: ', message_type);
console.log('errorCode: ' + errorCode);
console.log(errorObject);
console.log('userReset: ' + userReset);
},
}
}
}
</script>
<script src="https://cdn.privacy-mgmt.com/unified/wrapperMessagingWithoutDetection.js" async></script>
<script type="text/javascript">
function showPrivacyManager(sp_gdpr){
if(sp_gdpr){
document.getElementById("gdpr_link").style.display="inline-block";
}
}
window.__tcfapi('addEventListener', 2, function (tcData, success) {
console.log("tcData.gdprApplies: " + tcData.gdprApplies);
if (success) {
if (tcData.eventStatus === 'tcloaded'||tcData.eventStatus === 'cmpuishown') {
console.log(tcData.publisherCC);
showPrivacyManager(tcData.gdprApplies) // triggers 2x
window.__tcfapi('removeEventListener', 2, function (success) {
if(success) {
console.log('removed: '+tcData.listenerId); // triggers 1x
}
}, tcData.listenerId);
}
}
});
</script>
</head>
<body>
<h1>Multicampaign Demo TCFv2 TESTING gdprAppliesFlag</h1>
<p>GDPR Test</p>
<button id="gdpr_link" style="display:none" onclick="window._sp_.gdpr.loadPrivacyManagerModal(548057)">GDPR PM</button>
</body>
</html>