PluginProbe ʕ •ᴥ•ʔ
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode / 4.0.3
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode v4.0.3
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 / settings-page.js
cookiebot / assets / js / backend Last commit date
gutenberg 4 years ago debug-page.js 4 years ago jquery.tipTip.js 4 years ago network-settings-page.js 4 years ago prior-consent-settings.js 4 years ago settings-page.js 4 years ago
settings-page.js
74 lines
1 /**
2 * Load init function when the page is ready
3 *
4 * @since 1.8.0
5 */
6 jQuery( document ).ready( init );
7
8 function init() {
9 language_toggle();
10 advanced_settings_toggle();
11 cookie_blocking_mode();
12 }
13
14 function language_toggle() {
15 jQuery( '#show_add_language_guide' ).on( 'click', function ( e ) {
16 e.preventDefault()
17 jQuery( '#add_language_guide' ).slideDown()
18 jQuery( this ).hide()
19 } )
20 jQuery( '#hide_add_language_guide' ).on( 'click', function ( e ) {
21 e.preventDefault()
22 jQuery( '#add_language_guide' ).slideUp()
23 jQuery( '#show_add_language_guide' ).show()
24 } )
25
26 jQuery( '#cookiebot-language' ).on( 'change', function () {
27 if ( this.value === '' ) {
28 jQuery( '#info_lang_autodetect' ).show()
29 jQuery( '#info_lang_specified' ).hide()
30 } else {
31 jQuery( '#info_lang_autodetect' ).hide()
32 jQuery( '#info_lang_specified' ).show()
33 }
34 } )
35 }
36
37 function advanced_settings_toggle() {
38 jQuery( '.cookiebot_fieldset_header' ).on( 'click', function ( e ) {
39 e.preventDefault()
40 jQuery( this ).next().slideToggle()
41 jQuery( this ).toggleClass( 'active' )
42 } )
43 }
44
45 function resetConsentMapping() {
46 if ( confirm( 'Are you sure you want to reset to default consent mapping?' ) ) {
47 jQuery( '.consent_mapping_table input[type=checkbox]' ).each( function () {
48 if ( !this.disabled ) {
49 this.checked = ( jQuery( this ).data( 'default-value' ) === '1' )
50 }
51 } )
52 }
53 return false
54 }
55
56 function cookie_blocking_mode() {
57 var cookieBlockingMode = cookiebot_settings.cookieBlockingMode;
58
59 jQuery( 'input[type=radio][name=cookiebot-cookie-blocking-mode]' ).on( 'change', function () {
60 if ( this.value === 'auto' && cookieBlockingMode !== this.value ) {
61 jQuery( '#cookiebot-setting-async, #cookiebot-setting-hide-popup' ).css( 'opacity', 0.4 )
62 jQuery( 'input[type=radio][name=cookiebot-script-tag-uc-attribute], input[name=cookiebot-nooutput]' ).prop( 'disabled', true )
63 }
64 if ( this.value === 'manual' && cookieBlockingMode !== this.value ) {
65 jQuery( '#cookiebot-setting-async, #cookiebot-setting-hide-popup' ).css( 'opacity', 1 )
66 jQuery( 'input[type=radio][name=cookiebot-script-tag-uc-attribute], input[name=cookiebot-nooutput]' ).prop( 'disabled', false )
67 }
68 cookieBlockingMode = this.value
69 } )
70 if ( cookieBlockingMode === 'auto' ) {
71 jQuery( '#cookiebot-setting-async, #cookiebot-setting-hide-popup' ).css( 'opacity', 0.4 )
72 jQuery( 'input[type=radio][name=cookiebot-script-tag-uc-attribute], input[name=cookiebot-nooutput]' ).prop( 'disabled', true )
73 }
74 }