PageSourceSearch

https://gordonbrothersmarketplace.com/Scripts/Home/Index/Index.js

js gordonbrothersmarketplace.com collected 2026-10-09 22:13:03 UTC 2,460 bytes, 97 lines download raw bytes

1var homeIndexConfig = $('#home-index-config');
2
3window.dynamicGetNextLiveAuctionUrl = homeIndexConfig.attr('data-next-live-auction-url');
4
5function getHomePageCounts() {
6  $.ajax({
7    url: homeIndexConfig.attr('data-home-page-counts-url'),
8    type: 'GET',
9    success: function (e) {
10      var homeCounts = (e && e.data) ? e.data : {};
11      const counts = {
12        countTerraverse: "#count-terraverse",
13        countConstruction: "#count-construction",
14        countTransportation: "#count-transportation"
15      };
16
17      for (const [key, selector] of Object.entries(counts)) {
18        const count = homeCounts[key];
19        updateClasses(selector, count);
20      }
21    },
22    error: function (e) {
23      console.log(e);
24    }
25  });
26}
27
28function updateClasses(selector, count) {
29  const countSpan = $(selector);
30  const btn = $(`#btn-${selector.replace("#count-", "")}`);
31
32  if (count && count > 0) {
33    countSpan.text(`(${count})`)
34    btn.removeClass("center-noCount").addClass("center-count");
35  } else {
36    countSpan.text("");
37    btn.removeClass("center-count").addClass("center-noCount");
38  }
39}
40
41getHomePageCounts();
42
43if (liveAuctionModel != null) {
44  kendo.bind($("#auctionInProgress"), liveAuctionModel);
45  liveAuctionModel.checkLiveAuction();
46}
47
48function populateUpcomingAuctions() {
49  try {
50    var selectUpcomingAuctions = $('#selectUpcomingAuctions');
51    if (selectUpcomingAuctions != null) {
52      selectUpcomingAuctions.change(function () {
53        window.location.href = '/auction/events';
54      });
55    }
56  }
57  catch (err) {
58    console.log(err.message);
59  }
60};
61
62$(document).ready(function () {
63  //console.log('document.ready');
64
65  try {
66    $("#sectionTopCategories").fadeTo(1000, 1.0, function () {
67    });
68  }
69  catch (err) {
70    $("#sectionTopCategories").show();
71  }
72
73  //populateUpcomingAuctions();
74});
75
76function loadBackground(element) {
77  const cssBgUrl = getComputedStyle(element).getPropertyValue('--bg-image').trim();
78  if (!cssBgUrl) return;
79
80  element.classList.add('bg-loaded');
81}
82
83let observer = new IntersectionObserver((entries, observer) => {
84  entries.forEach(entry => {
85    if (entry.isIntersecting) {
86      loadBackground(entry.target);
87      observer.unobserve(entry.target);
88    }
89  });
90}, {
91  threshold: 0.1,
92  rootMargin: '50px'
93});
94
95document.querySelectorAll('.lazy-bg').forEach(el => {
96  observer.observe(el);
97});

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.