PageSourceSearch

https://micasta.com/_inc/global_assets/builder/apps_helpers/cookiebar/cookiebar_consent.js?version=582

js micasta.com collected 2026-10-09 16:52:01 UTC 5,980 bytes, 216 lines download raw bytes

1$('document').ready(function() {
2	//$.removeCookie('omw_app_cookiebar_consent', { path: '/' }); 
3	
4
5
6
7
8	$("body").on("click",".tabs-cookies .left-side", function(e){
9		e.preventDefault();
10		if ($(this).closest(".tab-item").find(".body").hasClass("hidden")){
11			$(this).closest(".tab-item").find(".body").removeClass("hidden").show();
12			$(this).closest(".tab-item").find(".header .minus").removeClass("hide");
13			$(this).closest(".tab-item").find(".header .plus").addClass("hide");
14
15		}
16		else{
17			$(this).closest(".tab-item").find(".body").addClass("hidden").hide();
18			$(this).children(".minus").addClass("hide");
19			$(this).find(".minus").addClass("hidenn");
20			$(this).find(".plus").removeClass("hide");
21
22
23		}
24
25	
26	});
27	
28	$("body").on("click","#acceptCookieText", function(e){
29		e.preventDefault();
30		try{
31			UIkit.modal($("#omw-tos-modal-overflow-cookies2")).show(); 
32		}catch(err){}
33	});
34	
35	$("body").on("click",".wm-customize-cookies", function(e){
36		e.preventDefault();
37		try{
38			UIkit.modal($("#modal-cookie-settings")).show(); 
39		
40		}catch(err){}
41	});
42	
43	$("body").on("click",".wm-confirm-choices", function(e){
44		e.preventDefault();
45
46		if ($("#filter1").is(":checked")){
47			$.cookie('weasy_cookies_1', 'true', { expires: 333650, path: '/' });
48			if (typeof gtag === 'function') {
49				gtag('consent', 'update', {
50					'ad_storage': 'granted',
51					'ad_personalization': 'granted',
52					'ad_user_data': 'granted'
53				  });
54			}
55		}
56		else{
57			$.cookie('weasy_cookies_1', 'true', { expires: -1, path: '/' });
58			if (typeof gtag === 'function') {
59				gtag('consent', 'update', {
60					'ad_storage': 'denied',
61					'ad_personalization': 'denied',
62					'ad_user_data': 'denied'
63				  });
64			}
65
66		}
67
68		if ($("#filter2").is(":checked")){
69			$.cookie('weasy_cookies_2', 'true', { expires: 333650, path: '/' });
70			if (typeof gtag === 'function') {
71				gtag('consent', 'update', {
72					'analytics_storage': 'granted'
73				  });
74			}
75		}
76		else{
77			$.cookie('weasy_cookies_2', 'true', { expires: -1, path: '/' });
78			if (typeof gtag === 'function') {
79				gtag('consent', 'update', {
80					'analytics_storage': 'denied'
81				  });
82			}
83		}
84
85	
86		if ($("#filter3").is(":checked")){
87			$.cookie('weasy_cookies_3', 'true', { expires: 333650, path: '/' });
88		}
89		else{
90			$.cookie('weasy_cookies_3', 'true', { expires: -1, path: '/' });
91		}
92
93
94		$.cookie('omw_app_cookiebar_consent', 'viewed', { expires: 3650, path: '/' });
95		
96		UIkit.modal($("#modal-cookie")).hide(); 
97		UIkit.modal($("#modal-cookie-settings")).hide(); 
98		setTimeout(function(){
99			$("#modal-cookie").hide();
100			$("#modal-cookie-settings").hide();
101		}, 500)
102	
103	});
104
105
106	$("body").on("click",".wm-manage-cookies", function(e){
107		e.preventDefault();
108		$(this).html("<div uk-spinner='ratio: .5'></div>")
109		buildCookies(2);
110	});
111
112	$("body").on("click",".wm-reject-cookies", function(e){
113		e.preventDefault();
114		$.cookie('weasy_all_cookies', 'false', { expires: -1, path: '/' });
115		$.cookie('weasy_cookies_1', 'false', { expires: -1, path: '/' });
116		$.cookie('weasy_cookies_2', 'false', { expires: -1, path: '/' });
117		$.cookie('weasy_cookies_3', 'false', { expires: -1, path: '/' });
118
119		if (typeof gtag === 'function') {
120			gtag('consent', 'update', {
121				'ad_storage': 'denied',
122				'ad_personalization': 'denied',
123				'ad_user_data': 'denied',
124				'analytics_storage': 'denied'
125			});
126		}
127
128
129		$.cookie('omw_app_cookiebar_consent', 'viewed', { expires: 3650, path: '/' });
130
131		UIkit.modal($("#modal-cookie")).hide(); 
132		UIkit.modal($("#modal-cookie-settings")).hide();
133		setTimeout(function(){
134			$("#modal-cookie").hide();
135			$("#modal-cookie-settings").hide();
136		}, 500)
137	});
138
139
140	$("body").on("click",".wm-accept-all-cookies", function(e){
141		e.preventDefault();
142		$.cookie('weasy_all_cookies', 'true', { expires: 3650, path: '/' });
143		$.cookie('weasy_cookies_1', 'true', { expires: 333650, path: '/' });
144		$.cookie('weasy_cookies_2', 'true', { expires: 333650, path: '/' });
145		$.cookie('weasy_cookies_3', 'true', { expires: 333650, path: '/' });
146
147		if (typeof gtag === 'function') {
148			gtag('consent', 'update', {
149				'ad_storage': 'granted',
150				'ad_personalization': 'granted',
151				'ad_user_data': 'granted',
152				'analytics_storage': 'granted'
153			});
154		}
155
156
157		$.cookie('omw_app_cookiebar_consent', 'viewed', { expires: 3650, path: '/' });
158
159		UIkit.modal($("#modal-cookie")).hide(); 
160		UIkit.modal($("#modal-cookie-settings")).hide();
161		setTimeout(function(){
162			$("#modal-cookie").hide();
163			$("#modal-cookie-settings").hide();
164		}, 500)
165
166	});
167	
168	
169	 buildCookies = function(type){
170			$("#modal-cookie").remove();
171			$("#modal-cookie-settings").remove();
172			$.ajax({
173				type: "GET",
174				url: "/_inc/global_assets/builder/apps_helpers/cookiebar/cookiebar.php?lang="+$('html').attr("iso"),
175				data: "",
176				dataType:"json",
177				success: function(msg){
178					$( Base64.decode(msg.html) ).hide().prependTo("#builder-sections");
179					if (msg.force == "true"){
180						
181						if ( $.cookie('weasy_cookies_1')!="true" || $.cookie('weasy_cookies_2')!="true") {
182							$("#modal-cookie").css("display","flex");
183							$("#modal-cookie-settings").css("display","flex");
184							UIkit.modal("#modal-cookie").show();
185						}
186					}
187					if (! $.cookie('omw_app_cookiebar_consent') && msg.force != "true" || type=="2") {
188							if (msg.status==1) {
189								if(msg.mostra==1){
190									setTimeout(function(){
191										// $("#modal-cookie").show();
192										// $("#modal-cookie-settings").show();
193										if (type=="1"){
194											$("#modal-cookie").css("display","flex");
195											$("#modal-cookie-settings").css("display","flex");
196											UIkit.modal("#modal-cookie").show();
197										}
198										if (type=="2"){
199											$("#modal-cookie").css("display","flex");
200											$("#modal-cookie-settings").css("display","flex");
201											UIkit.modal("#modal-cookie-settings").show();
202										}
203									}, 500)
204								}
205							}
206						}
207				},
208				error: function(XMLHttpObj, erroCode) {
209				}
210		});
211	
212	
213	}
214	buildCookies(1);
215
216});

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.