PageSourceSearch

https://replaysurfacing.com/wp-content/themes/interiar/assets/js/interiar-woo-custom.js?ver=1.0

js replaysurfacing.com collected 2026-10-06 13:09:08 UTC 2,993 bytes, 101 lines download raw bytes

1( function( $ ) {
2	
3	"use strict";
4	
5	$(document).ready(function(){
6	
7		/*Woo Cart Item Remove Through Ajax*/
8		if( $( document ).find('.mini-cart-item').length ){
9			
10			$( document ).on( 'click', '.remove-cart-item', function(){
11				
12				var cur_ele = $(this);
13				cur_ele.addClass("loading");
14				var product_id = cur_ele.attr("data-product_id");
15				
16				$.ajax({
17					type: 'post',
18					dataType: 'json',
19					url: interiar_ajax_var.admin_ajax_url,
20					data: { 
21						action: "interiar_product_remove", 
22						nonce: interiar_ajax_var.remove_from_cart,
23						product_id: product_id
24					},
25					success: function(data){
26						
27						if( data['status'] == 1 ){
28							if( data['mini_cart'] ){
29								$(document).find('.mini-cart-dropdown li.cart-item[data-product-id="'+ product_id +'"]').fadeOut( 350, function(){
30									$(document).find(".mini-cart-dropdown ul.cart-dropdown-menu").html( data['mini_cart'] );
31									$(document).find(".mini-cart-dropdown .woo-icon-count").text( data['cart_count'] );
32								});
33								
34							}														
35							$( document.body ).trigger( 'wc_fragment_refresh' );
36						}
37						
38						cur_ele.removeClass("loading");
39						
40					},
41					error: function(xhr, status, error) {
42						cur_ele.removeClass("loading");
43					}
44				});
45				return false;
46			});	
47			var mini_cart_parent = $(".mini-cart-dropdown a.mini-cart-item");
48			$(mini_cart_parent).one('DOMSubtreeModified', function() {
49				if( $(".mobile-header-items").find(".cart-bar-toggle").length ){
50					setTimeout(function(){
51						var mobile_cart_txt = mini_cart_parent.html();
52						$(".mobile-header-items").find(".cart-bar-toggle").html(mobile_cart_txt);
53					}, 100);
54				}
55			});
56			
57		}
58		
59		
60		$( document ).on( 'click', "a.interiar_ajax_add_to_cart", function( event) {
61			
62			if( $("body.page-template-interiar-wishlist").length ){
63				$(this).parents("tr").find("a.interiar-wishlist-remove").trigger("click");
64			}
65			
66			var cur_ele = $(this);
67			cur_ele.addClass("loading");
68			var product_id = $(this).attr("data-product_id");
69			var main_parent = $(this).parents('li.menu-item.dropdown');
70			
71			$.ajax({
72				type: 'post',
73				dataType: 'json',
74				url: interiar_ajax_var.admin_ajax_url,
75				data: { 
76					action: "interiar_add_to_cart",
77					product_id: product_id,
78					nonce: interiar_ajax_var.add_to_cart
79				},success: function(data){
80					cur_ele.removeClass("loading");
81					if( data['status'] == 1 ){							
82						if( data['mini_cart'] ){
83							$(document).find(".mini-cart-dropdown ul.cart-dropdown-menu").html( data['mini_cart'] );
84							$(document).find(".mini-cart-item .woo-icon-count").text( data['cart_count'] );
85							
86						}				
87						$( document.body ).trigger( 'wc_fragment_refresh' );
88					}
89				},error: function(xhr, status, error) {
90					cur_ele.removeClass("loading");
91				}
92			});
93			
94			return false;
95			
96		});
97		
98	});	
99		
100} )( jQuery );
101

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.