PageSourceSearch

https://www.toseast.com/wp-content/plugins/woocommerce-aelia-curre…urrency-switcher-widget.js?ver=4.7.3.190416

js toseast.com collected 2026-10-09 23:23:30 UTC 1,995 bytes, 55 lines download raw bytes

1jQuery(document).ready(function($) {
2	// Invalidate cache of WooCommerce minicart when Currency changes. This will
3	// ensure that the minicart is updated correctly
4	try {
5		var supports_html5_storage = ('sessionStorage' in window && window['sessionStorage'] !== null);
6		if(supports_html5_storage) {
7			// The fragment name might be generated dynamically by WooCommerce, so
8			// we have to retrieve it from the WC parameters
9			// @since WC 3.1
10			var fragment_name = 'wc_fragments';
11			if((typeof wc_cart_fragments_params !== 'undefined') && wc_cart_fragments_params && wc_cart_fragments_params.fragment_name) {
12				fragment_name = wc_cart_fragments_params.fragment_name;
13			}
14
15			$('.widget_wc_aelia_currencyswitcher_widget, .widget_wc_aelia_billing_country_selector_widget').on('submit', 'form', function() {
16				sessionStorage.removeItem(fragment_name, '');
17			});
18		}
19	}
20	catch(exception) {
21		var error_msg = 'Aelia - Exception occurred while accessing window.sessionStorage. ' +
22										'This could be caused by the browser disabling cookies. ' +
23										'COOKIES MUST BE ENABLED for the site to work correctly. ' +
24										'Exception details below.';
25		console.log(error_msg);
26		console.log(exception);
27	}
28
29	// Hide the "Change Currency" button and submit the Widget form when Currency
30	// changes
31	$('.widget_wc_aelia_currencyswitcher_widget')
32		.find('.change_currency')
33		.hide()
34		.end()
35		.on('change', '#aelia_cs_currencies', function(event) {
36			var currency_widget_form = $(this).closest('form');
37			$(currency_widget_form).submit();
38			event.stopPropagation();
39			return false;
40		});
41
42	// Hide the "Change country" button and submit the Widget form when billing
43	// country changes
44	$('.currency_switcher.widget_wc_aelia_country_selector_widget')
45		.find('.change_country')
46		.hide()
47		.end()
48		.on('change', '.countries', function(event) {
49			var widget_form = $(this).closest('form');
50			$(widget_form).submit();
51			event.stopPropagation();
52			return false;
53		});
54
55});

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.