PageSourceSearch

https://nc-100.org/wp-content/uploads/ac_assets/logo_marquee/logo-marquee.js?ver=2.0.21

js nc-100.org collected 2026-10-04 02:17:01 UTC 4,605 bytes, 150 lines download raw bytes

1function UCMarquee(marquee) {
2  
3  var g_marquee;
4  
5  function cloneSlider() {
6    Array.prototype.forEach.call(g_marquee, item => {
7      var parent = item
8      var slide = item.children
9      Array.prototype.forEach.call(slide, item => {
10        parent.appendChild(item.cloneNode(true))
11      })
12    })
13  }
14  
15  function wrapSlides() {
16    Array.prototype.forEach.call(g_marquee, item => {
17      item.innerHTML = '<div class="uc-logo-wrapper">' + item.innerHTML + '</div>'
18    })
19  }
20  
21  function setWidth() {
22    Array.prototype.forEach.call(g_marquee, parentItem => {
23      
24      //make sure that parentItem is displayed on a page before measure its width
25      parentItem.style.display = "flex";
26      
27      var parentWidth = parentItem.offsetWidth;
28      var slide = parentItem.querySelectorAll('.uc_logo_marquee_holder');
29      var viewportWidth = parseInt(jQuery(window).width());
30      
31      var isBreakPoint = function (breakpoint) {
32        var breakpointsArray = [319, 767, 1024, 1920];
33        var breakpointsArrayLength = breakpointsArray.length;
34        var min, max;
35        
36        for (var i = 0; i < breakpointsArrayLength; i++) {
37          if (breakpointsArray[i] === breakpoint) {
38            min = breakpointsArray[i-1] || 0
39            max = breakpointsArray[i]
40            break
41          }
42        }
43        return viewportWidth > min && viewportWidth <= max
44      }
45      
46      var dataHeight = parseInt(jQuery(parentItem).attr('data-height'));
47      var dataMargin = jQuery(parentItem).data('margin');
48      var dataItemsNumberMobile = jQuery(parentItem).data('mobile-items');
49      var dataItemsNumberTablet = jQuery(parentItem).data('tablet-items');
50      var dataItemsNumberDesktop = jQuery(parentItem).data('desktop-items');
51      var direction = jQuery(parentItem).data('direction');
52      
53      if (direction == 'up' || direction == 'down'){
54        
55        if (isBreakPoint(767))
56        parentItem.style.height = (dataHeight + dataMargin) * dataItemsNumberMobile + 'px'
57        
58        if (isBreakPoint(1024))
59        parentItem.style.height = (dataHeight + dataMargin) * dataItemsNumberTablet + 'px'
60        
61        if (isBreakPoint(1920) || viewportWidth > 1920 )
62        parentItem.style.height = (dataHeight + dataMargin) * dataItemsNumberDesktop + 'px'
63        
64      }
65      
66      parentItem.style.display = "none";
67      
68      Array.prototype.forEach.call(slide, item => {
69        
70        if(direction == 'right' || direction == 'left')
71        item.style.marginRight = dataMargin + 'px'
72        
73        if(direction == 'up' || direction == 'down')
74        item.style.marginTop = dataMargin + 'px'  
75        
76        if(direction == 'right' || direction == 'left' ){
77          
78          if (isBreakPoint(767)) 
79          item.style.width = (parentWidth / dataItemsNumberMobile) - dataMargin + 'px'
80          
81          if (isBreakPoint(1024)) 
82          item.style.width = (parentWidth / dataItemsNumberTablet) - dataMargin + 'px'
83          
84          if (isBreakPoint(1920) || (viewportWidth > 1920)) 
85          item.style.width = (parentWidth / dataItemsNumberDesktop) - dataMargin + 'px'
86          
87        }
88      })
89      
90      setTimeout(function(){
91        parentItem.style.display = "flex";
92      },200);
93      
94    })
95  }
96  
97  function setAnimationOptions() {
98    Array.prototype.forEach.call(g_marquee, item => {
99      var speed = jQuery(item).data('speed');
100      var marqueeList = item.children[0]
101      var slidesAmount = marqueeList.children.length / 4
102      var marqueeSpeed = speed * slidesAmount
103      
104      marqueeList.style.animationDuration = marqueeSpeed / 1000 + 's'
105      marqueeList.style.WebkitAnimationDuration = marqueeSpeed / 1000 + 's'
106      
107      var paused = jQuery(item).data('paused');
108      
109      if (paused) {
110        marqueeList.onmouseenter = (event) => {
111          event.target.style.animationPlayState = 'paused'
112          event.target.style.WebkitAnimationPlayState = 'paused'
113        }
114        marqueeList.onmouseleave = (event) => {
115          event.target.style.animationPlayState = ''
116          event.target.style.WebkitAnimationPlayState = ''
117        }
118      }
119      
120    })
121  }
122  
123  function init() {
124    
125    g_marquee = marquee;
126    
127    cloneSlider()
128    cloneSlider()
129    setWidth()
130    wrapSlides()
131    setAnimationOptions()
132    
133    
134    var width = jQuery(window).width();
135    
136    window.addEventListener('resize', function() {
137
138      if (jQuery(this).width() != width) {
139        
140        width = jQuery(this).width();
141        
142        setWidth()
143        
144      }
145
146    })
147  }
148  
149  init()
150}

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.