PageSourceSearch

https://www.kaloo.com/themes/theme_nq/assets/js/custom.js?v=1.1

js kaloo.com collected 2026-09-26 11:20:17 UTC 3,229 bytes, 94 lines download raw bytes

1$(document).ready(function(){
2    var observer = new MutationObserver(function(mutations) {
3        mutations.forEach(function(mutation) {
4            if (mutation.addedNodes && mutation.addedNodes.length > 0) {
5                var hasClass = [].some.call(mutation.addedNodes, function(el) {
6                    if($(el).data('popin-type') == "error"){
7                        return el.classList.contains('nq-Popin')
8                    }
9                    else{
10                        return false;
11                    }
12                });
13                if (hasClass) {
14                    $('.nq-Popin-close').click(function(){$(this).parent().parent().remove();$('html').attr('data-popin-opened', false);});
15                }
16            }
17        });
18    });
19    
20    var config = {
21        attributes: true,
22        childList: true,
23        characterData: true
24    };
25    
26    observer.observe(document.body, config);
27
28    $(document).ajaxComplete(function(event, xhr, settings) { 
29        if(typeof xhr.responseJSON !== "undefined"){
30
31            setTimeout(
32                function() 
33                {
34                    if($(".nq-Popin")[0]){
35                        //DO NOTHING
36                    }
37                    else{
38                        if(typeof xhr.responseJSON.cart_detailed === 'undefined'){
39                            //DO NOTHIGN
40                        }
41                        else{
42                            window.location.href = location.protocol + '//' + location.host + location.pathname;
43                        }
44                    }
45                }, 1000);
46        }
47    });
48
49    //Infinite scroll button
50    $.getScript( "/themes/theme_nq/assets/js/vendors/09-jquery.appear.js").done(function(){
51        $.appear('.nq-c-Pagination-infinite .nq-c-Btn');
52
53        $('.nq-c-Pagination-infinite .nq-c-Btn').on('appear', function(event) {
54            $(this)[0].click();
55        });
56
57        // The node to be monitored
58        var target = $( ".kl-CategoryProductList-content" )[0];
59
60        // Create an observer instance
61        var observer = new MutationObserver(function( mutations ) {
62            mutations.forEach(function( mutation ) {
63                var newNodes = mutation.addedNodes; // DOM NodeList
64                if( newNodes !== null ) { // If there are new nodes added
65                    $('.nq-c-Pagination-infinite .nq-c-Btn').on('appear', function(event) {
66                        $(this)[0].click();
67                    });
68                }
69            });
70        });
71
72        // Configuration of the observer:
73        var config = { 
74            attributes: true, 
75            childList: true, 
76            characterData: true 
77        };
78        
79        // Pass in the target node, as well as the observer options
80        observer.observe(target, config);
81    });
82
83    //Form on click on button
84    $(".nq-c-File-custom").click(function() {
85        $(".nq-c-Contact-Input-input").trigger('click');
86    });
87
88    $('.nq-c-Contact-Input-input').on('change', function() {
89        var val = $(this).val().split('\\');
90        if(val.at(-1) != "2" && val.at(-1) != "1"){
91            $('.nq-c-File-custom-label-xtra').text(val.at(-1));
92        }
93    })
94});

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.