1// obtain plugin 2var cc = initCookieConsent(); 3 4// run plugin with your configuration 5cc.run({ 6 current_lang: 'en', 7 autoclear_cookies: true, // default: false 8 page_scripts: true, // default: false 9 10 // mode: 'opt-in' // default: 'opt-in'; value: 'opt-in' or 'opt-out' 11 // delay: 0, // default: 0 12 // auto_language: null // default: null; could also be 'browser' or 'document' 13 // autorun: true, // default: true 14 // force_consent: false, // default: false 15 // hide_from_bots: true, // default: true 16 // remove_cookie_tables: false // default: false 17 // cookie_name: 'cc_cookie', // default: 'cc_cookie' 18 // cookie_expiration: 182, // default: 182 (days) 19 // cookie_necessary_only_expiration: 182 // default: disabled 20 // cookie_domain: location.hostname, // default: current domain 21 // cookie_path: '/', // default: root 22 // cookie_same_site: 'Lax', // default: 'Lax' 23 // use_rfc_cookie: false, // default: false 24 // revision: 0, // default: 0 25 26 onFirstAction: function(user_preferences, cookie){ 27 // callback triggered only once 28 }, 29 30 onAccept: function (cookie) { 31 // ... 32 }, 33 34 onChange: function (cookie, changed_preferences) { 35 // ... 36 }, 37 38 languages: { 39 'en': { 40 consent_modal: { 41 title: 'We use CDNs, cookies! & opt-in analytics', 42 //description: 'Hi, this website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent. <button type="button" data-cc="c-settings" class="cc-link">Let me choose</button>', 43 description: 'Hi, this website uses Content Delivery Networks and other third parties to serve resources; these parties get access to your IP address when resources are accessed. This website uses essential cookies to ensure its proper operation. It uses analytics scripts to understand site interactions - so I can make improvements. <strong>Analytics scripts are used only with your consent.</strong> Your interactions and IP address is sent to our analytics provider in this case. <button type="button" data-cc="c-settings" class="cc-link">Let me choose</button> | <a href="/privacy.html">Privacy Policy</a>', 44 primary_btn: { 45 text: 'Accept all', 46 role: 'accept_all' // 'accept_selected' or 'accept_all' 47 }, 48 secondary_btn: { 49 text: 'Reject non-essential', 50 role: 'accept_necessary' // 'settings' or 'accept_necessary' 51 }, 52 layout: 'box inline', 53 position: 'bottom left', 54 equalWeightButtons: true, 55 flipButtons: false, 56 }, 57 settings_modal: { 58 title: 'Cookie preferences', 59 save_settings_btn: 'Save settings', 60 accept_all_btn: 'Accept all', 61 reject_all_btn: 'Reject all', 62 close_btn_label: 'Close', 63 cookie_table_headers: [ 64 {col1: 'Name'}, 65 {col2: 'Domain'}, 66 {col3: 'Expiration'}, 67 {col4: 'Description'} 68 ], 69 blocks: [ 70 { 71 title: 'Cookie usage ð¢', 72 description: 'I use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can choose for each category to opt-in/out whenever you want. For more details relative to cookies and other sensitive data, please read the full <a href="#" class="cc-link">privacy policy</a>.' 73 }, { 74 title: 'Strictly necessary cookies', 75 description: 'These cookies are essential for the proper functioning of my website. Without these cookies, the website would not work properly', 76 toggle: { 77 value: 'necessary', 78 enabled: true, 79 readonly: true // cookie categories with readonly=true are all treated as "necessary cookies" 80 } 81 }, { 82 //DN title: 'Performance and Analytics cookies', 83 title: 'Analytics script', 84 description: 'This script collects information about website interactions, and your IP address, to our analytics partner Plausibe', 85 toggle: { 86 value: 'analytics', // your cookie category 87 enabled: false, 88 readonly: false 89 }, 90 cookie_table: [ // list of all expected cookies 91 /*{ 92 col1: '^_ga', // match all cookies starting with "_ga" 93 col2: 'google.com', 94 col3: '2 years', 95 col4: 'description ...', 96 is_regex: true 97 }, 98 { 99 col1: '_gid', 100 col2: 'google.com', 101 col3: '1 day', 102 col4: 'description ...', 103 }*/ 104 ] 105 }/*, {
106 title: 'Advertisement and Targeting cookies', 107 description: 'These cookies collect information about how you use the website, which pages you visited and which links you clicked on. All of the data is anonymized and cannot be used to identify you', 108 toggle: { 109 value: 'targeting', 110 enabled: false, 111 readonly: false 112 } 113 }*/, { 114 title: 'More information', 115 description: 'For any queries in relation to our policy on cookies and your choices, please <a class="cc-link" href="https://calcwithdec.dev/about">get in touch</a>.' 116 } 117 ] 118 } 119 } 120 } 121});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.