PageSourceSearch

https://www.alljobs.co.il/JavaScript/BannersLoaders/HomePageBannersLoader.js?ver=09_03_2026_123249

js alljobs.co.il collected 2026-10-01 12:02:52 UTC 5,562 bytes, 152 lines download raw bytes

1function DisplayBnrOpenXScriptV2(ZoneID, ElementID) {
2    try {
3        // Creating the XMLHttpRequest object
4        var request = new XMLHttpRequest();
5
6        var OpenxProtocol = (("https:" == document.location.protocol) ? "https://" : "http://");
7        var pageUrl = (("https:" == document.location.protocol) ? 'ajsHTTPS.ashx' : 'ajs.ashx');
8
9        // Instantiating the request object
10        request.open("GET", '/adBanner/' + pageUrl + '?zoneid=' + ZoneID + '&OpenxProtocol=' + OpenxProtocol + '&loc=' + location.href, true);
11
12        // Defining event listener for readystatechange event
13        request.onreadystatechange = function () {
14            // Check if the request is compete and was successful
15            if (this.readyState === 4 && this.status === 200) {
16                // Inserting the response from server into an HTML element
17                //document.getElementById("result").innerHTML = this.responseText;
18
19                var responseFinalRes = this.responseText;
20                // In case Banners Images don't work
21                /*
22                try {
23                    
24                    responseFinalRes = responseFinalRes.replaceAll(
25                        "https://openx.alljobs.co.il/www/images/",
26                        "https://www.alljobs.co.il/uploads/www/images/"
27                    );
28
29                    responseFinalRes = responseFinalRes.replaceAll(
30                        "http://openx.alljobs.co.il/www/images/",
31                        "https://www.alljobs.co.il/uploads/www/images/"
32                    );
33                    
34                }
35                catch (err) { }
36                */
37
38                document.getElementById(ElementID).innerHTML = responseFinalRes;
39            }
40        };
41
42        // Sending the request to the server
43        request.send();
44
45    } catch (err) { }
46}
47
48
49window.onload = function () {
50    setTimeout(function () {
51        //var loadBanners = setInterval(function () {               
52        //if (window.rbzid != undefined) {
53        DisplayBnrOpenXScriptV2('2', 'BannerScript2');
54        DisplayBnrOpenXScriptV2('10', 'BannerScript10');
55        DisplayBnrOpenXScriptV2('11', 'BannerScript11');
56        DisplayBnrOpenXScriptV2('12', 'BannerScript12');
57        DisplayBnrOpenXScriptV2('13', 'BannerScript13');
58        DisplayBnrOpenXScriptV2('14', 'BannerScript14');
59        DisplayBnrOpenXScriptV2('85', 'BannerScript85');
60        DisplayBnrOpenXScriptV2('86', 'BannerScript86');
61        DisplayBnrOpenXScriptV2('91', 'BannerScript91');
62        DisplayBnrOpenXScriptV2('92', 'BannerScript92');
63        if (window.location && !window.location.href.toLowerCase().includes("companies.aspx")) { // לא ננסה לטעון את הבאנרים הנל אם אנחנו נמצאים בלובי חברות
64            //DisplayBnrOpenXScriptV2('219', 'BannerScript219');
65            //DisplayBnrOpenXScriptV2('218', 'BannerScript218');
66            DisplayBnrOpenXScriptV2('275', 'BannerScript275');
67            DisplayBnrOpenXScriptV2('276', 'BannerScript276');
68            DisplayBnrOpenXScriptV2('277', 'BannerScript277');
69            DisplayBnrOpenXScriptV2('278', 'BannerScript278');
70        }
71        //clearInterval(loadBanners);
72        // }                
73        //},100);        
74    }, 0);
75}();
76
77var homePageStripSwiper;
78var wasDesktop = null;
79
80function initSwiper() {
81
82    // Only init on pages that have the homepage banner strip (avoid overwriting Companies carousel)
83    if (!document.getElementById('best-jobs-section-container')) {
84        return;
85    }
86
87    // Safety check: ensure Swiper library is loaded
88    if (typeof Swiper === 'undefined') {
89        console.warn('Swiper library not found');
90        return;
91    }
92
93    var windowWidth = window.innerWidth;
94    var isDesktop = windowWidth > 1900;
95    
96    // Debug logs can be removed in production
97    // console.log("INIT SWIPER RUNNING", windowWidth, isDesktop);
98
99    if (wasDesktop === isDesktop) return;
100    wasDesktop = isDesktop;
101
102    if (homePageStripSwiper) {
103        homePageStripSwiper.destroy(true, true);
104    }
105
106    var swiperOptions = {
107        navigation: {
108            nextEl: '.aj-popular-jobs-prev-btn',
109            prevEl: '.aj-popular-jobs-next-btn',
110        },
111        spaceBetween: 24,
112        speed: 4000
113    };
114
115    if (isDesktop) {
116        swiperOptions.slidesPerView = 5;
117        swiperOptions.loop = false;
118        swiperOptions.autoplay = false;
119        swiperOptions.initialSlide = 0;
120    } else {
121        swiperOptions.loop = true;
122        if (windowWidth < 1400) {
123            swiperOptions.initialSlide = 1;
124        }
125        swiperOptions.autoplay = {
126            delay: 1000,
127            disableOnInteraction: true,
128            pauseOnMouseEnter: true
129        };
130        swiperOptions.breakpoints = {
131            // When window width is >= 1000px (Case: Under 1366px) -> Show 3
132            1000: { slidesPerView: 3 },
133
134            // When window width is >= 1366px (Case: Under 1900px) -> Show 4
135            1400: {
136                slidesPerView: 4 },
137
138            // When window width is >= 1900px -> handled by isDesktop
139            1900: { slidesPerView: 5 }
140        };
141    }
142
143    homePageStripSwiper = new Swiper('#aj-popular-jobs .mySwiper', swiperOptions);
144}
145
146// Initialize Swiper
147initSwiper();
148
149// Add Resize Event Listener
150window.addEventListener('resize', function () {
151    initSwiper();
152});

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.