PluginProbe ʕ •ᴥ•ʔ
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode / 4.6.0
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode v4.6.0
4.7.2 4.7.1 trunk 2.3.0 2.4.0 2.4.1 2.4.2 2.5.0 3.0.0 3.0.1 3.1.0 3.10.0 3.10.1 3.11.1 3.11.2 3.11.3 3.2.0 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.5 3.6.6 3.7.0 3.7.1 3.8.0 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.2.0 4.2.1 4.2.10 4.2.11 4.2.12 4.2.13 4.2.14 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.3.10 4.3.11 4.3.12 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.7.1 4.3.8 4.3.9 4.3.9.1 4.4.0 4.4.1 4.4.2 4.5.0 4.5.1 4.5.10 4.5.11 4.5.2 4.5.3 4.5.4 4.5.5 4.5.6 4.5.7 4.5.8 4.5.9 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.7.0
cookiebot / assets / js / backend / network-settings-page.js
cookiebot / assets / js / backend Last commit date
gutenberg 3 years ago account-static.js 10 months ago account.js 10 months ago amplitude.js 1 year ago consent-mapping.js 1 year ago cookiebot-admin-script.js 1 year ago dashboard.js 1 year ago jquery.tipTip.js 3 years ago multiple-page.js 3 years ago network-settings-page.js 10 months ago prior-consent-settings.js 3 years ago settings-page.js 10 months ago support-page.js 1 year ago
network-settings-page.js
117 lines
1 jQuery( document ).ready( function ( $ ) {
2 let cookieBlockingMode = cookiebotNetworkSettings.cbm
3 $( 'input[type=radio][name=cookiebot-cookie-blocking-mode]' ).on( 'change', function () {
4 if ( this.value === 'auto' && cookieBlockingMode !== this.value ) {
5 $( '#cookiebot-setting-async, #cookiebot-setting-hide-popup' ).css( 'opacity', 0.4 )
6 $( '#declaration-tag').addClass('disabled__item');
7 $( 'input[type=radio][name=cookiebot-script-tag-uc-attribute], input[name=cookiebot-nooutput]' ).prop( 'disabled', true )
8 }
9 if ( this.value === 'manual' && cookieBlockingMode !== this.value ) {
10 $( '#cookiebot-setting-async, #cookiebot-setting-hide-popup' ).css( 'opacity', 1 )
11 $( '#declaration-tag, #cookie-popup').removeClass('disabled__item');
12 $( 'input[type=radio][name=cookiebot-script-tag-uc-attribute], input[name=cookiebot-nooutput]' ).prop( 'disabled', false )
13 }
14 cookieBlockingMode = this.value
15 } )
16 if ( cookieBlockingMode === 'auto' ) {
17 $( '#cookiebot-setting-async, #cookiebot-setting-hide-popup' ).css( 'opacity', 0.4 )
18 $( 'input[type=radio][name=cookiebot-script-tag-uc-attribute], input[name=cookiebot-nooutput]' ).prop( 'disabled', true )
19 }
20
21 jQuery('.cb-submit__msg').on('click',function(){
22 jQuery(this).addClass('hidden');
23 });
24
25 const initialValues = jQuery('form').serialize();
26 const events = {
27 change: 'input:not([type=text]), select',
28 input: 'input[type="text"], textarea'
29 };
30
31 Object.entries(events).forEach(entry => {
32 const [eventName, elements] = entry;
33 jQuery(document).on(eventName,elements,{initialValues: initialValues},function(event){
34 checkValues(event.data.initialValues)
35 });
36 });
37
38 ruleset_id();
39 remove_account();
40 } )
41
42 function check_id_frame(){
43 const cbFrameReg = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/;
44 return cbFrameReg.test(jQuery( '#cookiebot-cbid' ).val())
45 }
46
47 function ruleset_id(){
48 const cbidField = jQuery( '#cookiebot-cbid' );
49 const cbidCheck = jQuery( '.cookiebot-cbid-check' );
50 let fieldTimer;
51 let fieldInterval = 3000;
52
53 cbidField.on('keyup', function () {
54 clearTimeout(fieldTimer);
55 cbidField.addClass('check-progress');
56 cbidCheck.removeClass('check-pass').addClass('check-progress');
57 fieldTimer = setTimeout(show_ruleset_selector, fieldInterval);
58 });
59
60 cbidField.on('keydown', function () {
61 clearTimeout(fieldTimer);
62 });
63 }
64 function show_ruleset_selector() {
65 const cbidField = jQuery( '#cookiebot-cbid' );
66 const cbidCheck = jQuery( '.cookiebot-cbid-check' );
67 const cbidRulesetSelector = jQuery('#cookiebot-ruleset-id-selector');
68 const cbidSubmit = jQuery('.cookiebot-cbid-container p.submit #submit');
69
70 cbidCheck.removeClass('check-progress');
71 cbidField.removeClass('check-progress');
72
73 if(!cbidField.val()){
74 cbidCheck.removeClass('check-pass');
75 cbidRulesetSelector.addClass('hidden');
76 cbidSubmit.addClass('disabled');
77 return;
78 }
79
80 !check_id_frame() ? cbidRulesetSelector.removeClass('hidden') : cbidRulesetSelector.addClass('hidden');
81
82 cbidSubmit.removeClass('disabled');
83 }
84
85 function remove_account(){
86 const removeCta = jQuery('#cookiebot-cbid-reset-dialog');
87 const cbidAlert = jQuery('.cb-cbid-alert__msg');
88 const confirmCta = jQuery('#cookiebot-cbid-reset');
89 const cancelCta = jQuery('#cookiebot-cbid-cancel');
90 removeCta.on('click', function(){
91 cbidAlert.removeClass('hidden');
92 removeCta.addClass('disabled');
93 });
94 confirmCta.on('click', function(){
95 jQuery('#cookiebot-cbid').val('').removeClass('cbid-active');
96
97 // If the account was disconnected set blocking mode to 'auto' and 'Hide cookie popup' to false.
98 jQuery('input[type=radio][name=cookiebot-cookie-blocking-mode][value=auto]').prop('checked', true);
99 jQuery('input[name=cookiebot-nooutput]').prop( 'checked', false )
100
101 jQuery('.cb-settings__header p.submit #submit').click();
102 });
103 cancelCta.on('click', function(){
104 cbidAlert.addClass('hidden');
105 removeCta.removeClass('disabled');
106 });
107 }
108
109 function checkValues(initialValues){
110 let submitBtn = jQuery('p.submit #submit');
111 let newValues = jQuery('form').serialize();
112 if(newValues !== initialValues) {
113 submitBtn.addClass('enabled');
114 }else{
115 submitBtn.removeClass('enabled');
116 }
117 }