PageSourceSearch

https://www.contrado.fr/includes/cdo/js/CDONewHomePagePartialView.js

js contrado.fr collected 2026-09-28 06:06:09 UTC 2,932 bytes, 98 lines download raw bytes

1var IsCustomFabricTypeLibrary = false;
2var IsCustomWardrobe = false;
3var IsDesignYourHome = false; 
4
5function isInViewportNew(el) {
6    var elementTop = $(el).offset().top;
7    var elementBottom = elementTop + $(el).outerHeight();
8    var viewportTop = $(window).scrollTop();
9    var viewportBottom = viewportTop + $(window).height();
10    return elementBottom > viewportTop && elementTop < viewportBottom;
11};
12
13$(document).ready(function () {
14    //getPartialView("#FabricByType", "/fabricfilter/getfabricbytypepartialview");
15})
16
17document.addEventListener('scroll', function () {
18
19    if (IsCustomFabricTypeLibrary == false) {
20        var response = getPartialView("#CustomFabricLibrary", "/FabricFilter/getCustomFabricLibraryPartialView");
21        IsCustomFabricTypeLibrary = response;
22    }
23
24    if (checkIsRecentViewInView('secDivcustomLibrary') && IsCustomWardrobe == false) {
25        var response = getPartialView("#CustomWardrobe", "/FabricFilter/getCustomWardrobePartialView");
26        IsCustomWardrobe = response;
27    }
28    if (checkIsRecentViewInView('secUltimateWinter') && IsDesignYourHome == false) {
29        var response = getPartialView("#DesignYourHome", "/FabricFilter/getDesignYourHomePartialView");
30        IsDesignYourHome = response;
31    }
32
33});
34
35function checkIsRecentViewInView(divId) {
36    var viewElement = document.querySelector('#' + divId)
37    if (viewElement != null) {
38        return isInViewportNew(viewElement);
39    }
40    else {
41        return false;
42    }
43}
44
45function getPartialView(Id, Url) {
46    var commonVar = false;
47    $.ajax({
48        type: "GET",
49        url: Url,
50        contentType: "application/html; charset=utf-8",
51        dataType: "html",
52        async: false,
53        success: function (response) {
54            $(Id).html(response);
55            commonVar = true;
56        },
57        failure: function (response) {
58            commonVar = false;
59        },
60        error: function (response) {
61            commonVar = false;
62        }
63    });
64    return commonVar;
65}
66
67function LoadHomepageswiper(el, noofimages,className) {
68    new Swiper(el, {
69        slidesPerView: 1.5,
70        slidesPerGroup: 1,
71        spaceBetween: 25,
72        speed: 1000,
73        loop: false,
74        lazy: true,
75        navigation: {
76            nextEl: '.swiper-button-next',
77            prevEl: '.swiper-button-prev'
78        },
79        pagination: {
80            el: el + ' .' + className,
81            clickable: true
82        },
83        breakpoints: {
84            480: {
85                slidesPerView: 2,
86                slidesPerGroup: 1
87            },
88            768: {
89                slidesPerView: 3,
90                slidesPerGroup: 3,
91            },
92            1280: {
93                slidesPerView: noofimages === 3.5 ? 3.5 : 3,
94                slidesPerGroup: 3,
95            },
96        },
97    })
98};

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.