PageSourceSearch

https://store.thomashuebl.com/wp-content/plugins/woo-product-count…/assets/js/front.js?ver=3.6.8

js thomashuebl.com collected 2026-10-01 12:21:10 UTC 3,393 bytes, 123 lines download raw bytes

1jQuery(document).ready(function(){
2		
3	jQuery(document).on("click", ".cbr-country-widget", function(){	
4		jQuery('.cbr-widget-popup').show();
5	});
6	jQuery(document).on("click", ".popup_close_icon, .popupclose", function(){
7		jQuery('.cbr-widget-popup').hide();
8		jQuery('.cbr-shortcode-popup').hide();
9	});
10	jQuery(document).on("click", ".cbr-country-shortcode", function(){	
11		jQuery('.cbr-shortcode-popup').show();
12	});
13	jQuery(document).on("change", "#calc_shipping_country, #shipping_country", function(){	
14		Cookies.set('country', jQuery(this).val());
15		set_customer_country_on_checkout_without_reload();
16	}); 
17
18}); 
19
20function setCountryCookie(cookieName, cookieValue, nDays) {
21	var today = new Date();
22	var expire = new Date();
23
24	if (!nDays) 
25		nDays=1;
26
27	expire.setTime(today.getTime() + 3600000*24*nDays);
28	document.cookie = cookieName+"="+escape(cookieValue) + ";path=/;expires="+expire.toGMTString();
29	set_customer_country_on_checkout();
30	
31}
32
33function set_customer_country_on_checkout(){
34	"use strict";
35
36	var country = jQuery(this).val();
37	var data = {
38		action: 'set_widget_country',
39		country: country
40	};		
41	
42	jQuery.ajax({
43		url: cbr_ajax_object.cbr_ajax_url,
44		data: data,
45		type: 'POST',
46		dataType:"json",	
47		success: function(response) {
48			jQuery("#wp-admin-bar-cbr_item a.ab-item").text("CBR Country: "+response.country);
49			jQuery(".display-country-for-customer .country, .widget-country, .select-country-dropdown").val(response.countrycode);
50			jQuery(".cbr_shipping_country").text(response.country);	
51			location.reload();	
52		},
53		error: function(response) {
54			console.log(response);			
55		}
56	});
57	return false;
58}
59
60function setCookie(cookieName, cookieValue, nDays) {
61	var today = new Date();
62	var expire = new Date();
63
64	if (!nDays) 
65		nDays=1;
66
67	expire.setTime(today.getTime() + 3600000*24*nDays);
68	document.cookie = cookieName+"="+escape(cookieValue) + ";path=/;expires="+expire.toGMTString();
69	set_customer_country_on_checkout_without_reload();
70	
71}
72
73function set_customer_country_on_checkout_without_reload(){
74	"use strict";
75
76	var country = jQuery(this).val();
77	var data = {
78		action: 'set_widget_country',
79		country: country
80	};		
81	
82	jQuery.ajax({
83		url: cbr_ajax_object.cbr_ajax_url,
84		data: data,
85		type: 'POST',
86		dataType:"json",	
87		success: function(response) {
88			jQuery("#wp-admin-bar-cbr_item a.ab-item").text("CBR Country: "+response.country);
89			jQuery(".display-country-for-customer .country, .widget-country, .select-country-dropdown").val(response.countrycode);
90			jQuery(".cbr_shipping_country").text(response.country);		
91		},
92		error: function(response) {				
93		}
94	});
95	return false;
96}
97
98jQuery(document).on("submit", ".woocommerce-shipping-calculator", function(){
99	/*setTimeout(function() {
100		location.reload();
101	 }, 3000);*/
102	var country = jQuery('#calc_shipping_country').val();
103	var data = {
104		action: 'set_cart_page_country',
105		country: country
106	};		
107	
108	jQuery.ajax({
109		url: cbr_ajax_object.cbr_ajax_url,
110		data: data,
111		type: 'POST',
112		dataType:"json",	
113		success: function(response) {
114			jQuery("#wp-admin-bar-cbr_item a.ab-item").text("CBR Country: "+response.country);
115			jQuery(".display-country-for-customer .country, .widget-country, .select-country-dropdown").val(response.countrycode);
116			jQuery(".cbr_shipping_country").text(response.country);
117		},
118		error: function(response) {	
119			console.log(response);			
120		}
121	});
122	return false;
123});

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.