PageSourceSearch

https://bostonmusicawards.com/wp-content/themes/uncode/library/js/woocommerce-cart.js?ver=1312124374

js bostonmusicawards.com collected 2026-10-02 10:45:30 UTC 2,827 bytes, 88 lines download raw bytes

1(function($) {
2	"use strict";
3	/* global UncodeCartParameters */
4
5	/************************************************************
6	 * Inject HTML classes when the cart totals updates
7	 ************************************************************/
8
9	$(document.body).on('updated_shipping_method', update_cart_totals_classes);
10
11	function update_cart_totals_classes() {
12		$('.uncode-wc-cart').each(function() {
13			var container = $(this);
14			var cart_totals = container.find('.cart_totals');
15			var injector_id = container.attr('data-id');
16
17			if (typeof window['uncode_wc_cart_injector_' + injector_id] !== 'undefined') {
18				var injector = window['uncode_wc_cart_injector_' + injector_id];
19				var title = cart_totals.find('h2');
20				var button = cart_totals.find('.checkout-button');
21
22				button.removeClass('btn-default');
23				title.addClass(injector['title'].join(" "));
24				button.addClass(injector['button'].join(" "));
25			}
26		});
27	}
28
29	/************************************************************
30	 * Inject HTML classes when shipping calculator form is open
31	 ************************************************************/
32
33	$('.shipping-calculator-button').on('click', function () {
34		var _this = $(this);
35		var form = _this.closest('form');
36		var container = _this.closest('.uncode-wc-cart');
37		var button = form.find('button');
38		var injector_id = container.attr('data-id');
39
40		if (typeof window['uncode_wc_cart_injector_' + injector_id] !== 'undefined') {
41			var injector = window['uncode_wc_cart_injector_' + injector_id];
42
43			button.addClass(injector['derivated_button'].join(" "));
44		}
45	});
46
47	/************************************************************
48	 * Resize thumbs on mobile when we have the compact layout
49	 ************************************************************/
50
51	var needed_padding = 27;
52
53	var setCTA;
54
55	calculate_els_height();
56
57	$(window).on( 'wwResize', function(){
58		clearRequestTimeout(setCTA);
59		setCTA = requestTimeout( function(){
60			calculate_els_height();
61		}, 100 );
62	});
63	$( document.body ).on("wc_fragments_refreshed", function(e){
64		calculate_els_height();
65	});
66
67	function calculate_els_height(table) {
68		var cart_tables_compact = $('.uncode-wc-cart').find('table.cart.compact-layout');
69		cart_tables_compact.each(function() {
70			var table = $(this),
71				rows = table.find('tr.cart_item');
72
73			rows.each(function() {
74				var _this = $(this);
75				_this.find('td.product-subtotal').css('padding-bottom', '');
76				var row_height = _this.outerHeight();
77				var img_height = _this.find('td.product-thumbnail').find('img').outerHeight();
78				var min_height = row_height - (needed_padding * 2);
79
80				if (img_height > min_height) {
81					var diff = img_height - min_height;
82
83					_this.find('td.product-subtotal').css('padding-bottom', diff + needed_padding);
84				}
85			});
86		});
87	}
88})(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.