PageSourceSearch

https://tiinside.com.br/wp-content/plugins/webtoffee-gdpr-cookie-c…/js/cookie-law-info-ccpa.js?ver=2.3.7

js tiinside.com.br collected 2026-09-24 08:36:18 UTC 8,502 bytes, 211 lines download raw bytes

1(function( $ ) {
2    'use strict';
3    var CCPA = {
4        ccpaOptedOut: false, 
5        ccpaOptOutConfirmationOpen: false,
6        set: function() {
7           this.setCheckboxState();
8            jQuery(document).on('click','.wt-cli-ccpa-opt-out-checkbox',function() {
9                CCPA.ccpaOptedOut = false;
10                if(this.checked === true ) {
11                    CCPA.ccpaOptedOut = true;
12                }
13                CCPA.optOutCcpa();
14            });
15            jQuery(document).on('click','.wt-cli-ccpa-opt-out:not(.wt-cli-ccpa-opt-out-checkbox)',function(){
16                CCPA.showCcpaOptOutConfirmBox();
17            })
18        },
19        setCheckboxState : function() {
20            var cliConsent = {};
21            var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE);
22            if( preferenceCookie !== null ) { 
23                cliConsent = CCPA.parseCookie(preferenceCookie);
24                if( typeof( cliConsent.ccpaOptout ) !== 'undefined') {
25                    
26                    if( cliConsent.ccpaOptout === true ) {
27                        jQuery('.wt-cli-ccpa-opt-out-checkbox').prop('checked',true);
28                    }
29                    else {
30                        jQuery('.wt-cli-ccpa-opt-out-checkbox').prop('checked',false);
31                    }
32                }
33                
34            }
35        },
36        optOutCcpa: function() { 
37            var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE);
38            var cliConsent = {};
39            if( preferenceCookie !== null ) {
40                cliConsent = CCPA.parseCookie(preferenceCookie);
41            }
42            cliConsent.ccpaOptout = this.ccpaOptedOut;
43            cliConsent = JSON.stringify(cliConsent);
44            cliConsent = window.btoa(cliConsent);
45            CLI_Cookie.set(CLI_PREFERNCE_COOKIE,cliConsent,CLI_ACCEPT_COOKIE_EXPIRE);
46            this.setCheckboxState();
47        },
48        parseCookie: function( preferenceCookie ) {
49            var cliConsent = {};
50            if(CLI.isBase64(preferenceCookie))
51			{
52				cliConsent = window.atob(preferenceCookie);
53			}
54			else
55			{
56				cliConsent = decodeURIComponent(preferenceCookie);
57			}
58            cliConsent = JSON.parse(cliConsent);
59            return cliConsent;
60        },
61        toggleCCPA: function() {
62            
63        },
64        checkAuthentication: function() {
65            
66        },
67        showCcpaOptOutConfirmBox: function() {
68            
69            var css = '.cli-alert-dialog-buttons button {\
70                -webkit-box-flex: 1!important;\
71                -ms-flex: 1!important;\
72                flex: 1!important;\
73                -webkit-appearance: none!important;\
74                -moz-appearance: none!important;\
75                appearance: none!important;\
76                margin: 4px!important;\
77                padding: 8px 16px!important;\
78                border-radius: 64px!important;\
79                cursor: pointer!important;\
80                font-weight: 700!important;\
81                font-size: 12px !important;\
82                color: #fff;\
83                text-align: center!important;\
84                text-transform: capitalize;\
85                border: 2px solid #61a229;\
86            } #cLiCcpaOptoutPrompt .cli-modal-dialog{\
87                max-width: 320px;\
88            }\
89            #cLiCcpaOptoutPrompt .cli-modal-content {\
90                box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\
91            -webkit-box-shadow:0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\
92            -moz-box-shadow0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\
93            }\
94            .cli-alert-dialog-content {\
95                font-size: 14px;\
96            }\
97            .cli-alert-dialog-buttons {\
98                padding-top:5px;\
99            }\
100            button.cli-ccpa-button-cancel {\
101                background: transparent !important;\
102                color: #61a229;\
103            }\
104            button.cli-ccpa-button-confirm {\
105                background-color:#61a229;\
106                color:#ffffff;\
107            }';
108            var head = document.head || document.getElementsByTagName('head')[0];
109            var style = document.createElement('style');
110            var primaryColor = CLI.settings.button_1_button_colour;
111            var primaryLinkColor = CLI.settings.button_1_link_colour;
112            var backgroundColor = CLI.settings.background;
113            var textColor = CLI.settings.text;
114            CCPA.ccpaOptOutConfirmationOpen = false;
115            var ccpaPrompt,
116            $this = this;
117            (ccpaPrompt = document.createElement("div")).classList.add("cli-modal", "cli-show", "cli-blowup");
118            ccpaPrompt.id = "cLiCcpaOptoutPrompt";
119            var t = document.createElement("div");
120            t.className = "cli-modal-dialog";
121            var n=document.createElement("div");
122            n.classList.add("cli-modal-content","cli-bar-popup");
123            var o = document.createElement("div");
124            o.className="cli-modal-body";
125            var p = document.createElement("div");
126            p.classList.add("wt-cli-element", "cli-container-fluid", "cli-tab-container");
127            var q = document.createElement("div");
128            q.className="cli-row";
129            var r = document.createElement("div");
130            r.classList.add("cli-col-12");
131            var x = document.createElement("div");
132            x.classList.add("cli-modal-backdrop", "cli-fade", "cli-settings-overlay", "cli-show");
133            var a = document.createElement("button");
134            var b = document.createElement("button");
135            var c = document.createElement("div");
136            var d = document.createElement("div");
137            d.className = "cli-alert-dialog-content",
138            d.innerText = ccpa_data.opt_out_prompt,
139            c.className = "cli-alert-dialog-buttons";
140            a.className = "cli-ccpa-button-confirm",
141            a.innerText = ccpa_data.opt_out_confirm,
142            a.addEventListener("click",
143            function() {
144                CCPA.ccpaOptedOut = true,
145                CCPA.optOutCcpa(),
146                document.body.removeChild(ccpaPrompt),
147                document.body.removeChild(x),
148                document.body.classList.remove("cli-modal-open");
149                head.removeChild(style);
150                if( Cli_Data.ccpaType === 'ccpa' ){
151                    CLI.enableAllCookies();
152				    CLI.accept_close();
153                }
154            }
155            ),
156            b.className="cli-ccpa-button-cancel",
157            b.innerText = ccpa_data.opt_out_cancel,
158            b.addEventListener("click",
159            function() {
160                CCPA.ccpaOptedOut = false,
161                CCPA.optOutCcpa(),
162                document.body.removeChild(ccpaPrompt),
163                document.body.removeChild(x),
164                document.body.classList.remove("cli-modal-open");
165                head.removeChild(style);
166                if( Cli_Data.ccpaType === 'ccpa' ){
167                    CLI.enableAllCookies();
168				    CLI.accept_close();
169                }
170            }
171            ),
172            ccpaPrompt.addEventListener("click",
173            function( event ) {
174                event.stopPropagation();
175                if ( ccpaPrompt !== event.target) return;
176                document.body.removeChild(ccpaPrompt),
177                document.body.removeChild(x),
178                document.body.classList.remove("cli-modal-open");
179                head.removeChild(style);
180                
181            }),
182            ccpaPrompt.appendChild(t),
183            t.appendChild(n),
184            n.appendChild(o),
185            o.appendChild(p),
186            p.appendChild(q),
187            q.appendChild(r),
188            r.appendChild(d),
189            r.appendChild(c),
190            c.appendChild(b),
191            c.appendChild(a),
192           
193            head.appendChild(style);
194            style.type = 'text/css';
195            if (style.styleSheet){
196                // This is required for IE8 and below.
197                style.styleSheet.cssText = css;
198            } else {
199                style.appendChild(document.createTextNode(css));
200            }
201            document.body.appendChild(ccpaPrompt);
202            document.body.appendChild(x);
203            document.body.classList.add("cli-modal-open");
204
205        },
206    }
207    jQuery(document).ready(function() {
208        CCPA.set();
209    });
210    
211})( jQuery );

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.