PageSourceSearch

https://qu.edu.az/themes/custom/kutheme/js/odometer_init.js?tm86tp

js qu.edu.az collected 2026-10-02 19:48:09 UTC 1,797 bytes, 62 lines download raw bytes

1document.addEventListener('DOMContentLoaded', () => {
2
3  function initOdometerForContainer(dataId) {
4    console.log(dataId);
5    const targetElements = document.querySelectorAll(`[data-id="${dataId}"] .big`);
6
7    if (targetElements.length === 0) return;
8
9    const observer = new IntersectionObserver((entries) => {
10      entries.forEach(entry => {
11        if (entry.isIntersecting) {
12          const el = entry.target;
13          const strips = el.querySelectorAll('.smooth-digit-strip');
14
15          strips.forEach(strip => {
16            const finalDigit = parseInt(strip.getAttribute('data-digit'), 10);
17            const position = finalDigit === 0 ? 10 : finalDigit;
18
19            strip.style.transform = `translateY(-${position * 1.2}em)`;
20          });
21
22          observer.unobserve(el);
23        }
24      });
25    }, { threshold: 0.2 });
26
27    targetElements.forEach(el => {
28      const rawText = el.textContent.trim();
29      const characters = rawText.split('');
30      let htmlStructure = '';
31
32      characters.forEach(char => {
33        if (/[0-9]/.test(char)) {
34          const digitsArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0];
35
36          htmlStructure += `
37          <span class="smooth-digit-wrapper">
38            <span class="smooth-digit-strip" data-digit="${char}">
39              ${digitsArray.map(n => `<span>${n}</span>`).join('')}
40            </span>
41          </span>
42        `;
43        } else {
44          const finalChar = char === ' ' ? '&nbsp;' : char;
45          htmlStructure += `<span class="smooth-digit-static">${finalChar}</span>`;
46        }
47      });
48
49      el.innerHTML = htmlStructure;
50      observer.observe(el);
51    });
52  }
53
54  if (window.odometer_ids) {
55    window.odometer_ids.forEach(id => {
56      console.log(id);
57      initOdometerForContainer(id);
58    });
59  }
60});
61
62

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.