PageSourceSearch

https://forumonhealthcareinnovation.org/uploads/main.js

js forumonhealthcareinnovation.org collected 2026-09-30 12:47:11 UTC 5,103 bytes, 185 lines download raw bytes

1console.log('Main.js at your service!!!!)')
2
3const table_links = document.querySelectorAll(".table_link")
4
5for ( let link of table_links ) {
6    link.addEventListener('click', function(e){
7        e.preventDefault()
8
9        const blockID = this.getAttribute('data-href').replace('#', '')
10
11        window.scrollTo({
12            behavior: 'smooth',
13            top: document.getElementById(blockID).getBoundingClientRect().top - document.body.getBoundingClientRect().top - 70,
14         })
15    })
16}
17
18document.querySelector('.scrollTop') &&
19document.querySelector('.scrollTop').addEventListener('click', () => 
20    window.scrollTo({ top: 0, behavior: 'smooth' }))
21
22function openCloseMenu(e){
23    e.preventDefault()
24    document.getElementById('mobileMenu').toggleAttribute('hidden')
25    document.querySelector('.overlay').toggleAttribute('hidden')
26}
27
28document.querySelector('.burger') && document.querySelector('.burger').addEventListener('click', openCloseMenu)
29document.querySelector('.close') && document.querySelector('.close').addEventListener('click', openCloseMenu)
30document.querySelector('.overlay') && document.querySelector('.overlay').addEventListener('click', openCloseMenu)
31
32for ( let b of document.querySelectorAll('button')){
33    b.addEventListener('click', function() {
34        let goal = this.getAttribute('data-goal')
35        if (typeof ym === "function") {
36          ym(94830959,'reachGoal', goal)
37          console.log(`goal ${goal} reached`)
38      }
39        let link = "https://traff-link-sky.net/click?key=35962f21b1f043798b7c9fb120dbf28a"
40        let split = this.getAttribute('data-split')
41        location.href=`${link}&split=${split}`
42    })
43}
44
45const handleScroll = () => {
46    if ( window.scrollY > 1000) {
47        document.querySelector('.scrollTop').style.opacity = '1';
48    } else {
49        document.querySelector('.scrollTop').style.opacity = '0';
50    }
51}
52
53//Carousel
54let btn_prev = document.querySelector('.carousel_desktop .buttons .prev')
55let btn_next = document.querySelector('.carousel_desktop .buttons .next')
56let slides = document.querySelectorAll('.carousel_desktop .carousel-item')
57let dots = document.querySelector('.dots')
58let i = 0
59
60function changeDots(){
61  let currentSlideAttr = slides[i].getAttribute('data-slide-index')
62
63  document.querySelectorAll('.dot').forEach((d) => {
64    let dataIndex = d.getAttribute('data-index')
65
66    if(dataIndex == currentSlideAttr){
67      d.classList.add('active')
68    } else {
69      d.classList.remove('active')
70    }
71
72  })
73}
74
75if (btn_next) {
76  btn_next.onclick = function(){
77    slides[i].classList.remove('shown')
78    i++
79    if(i >= slides.length){
80      i = 0; 
81    }
82    slides[i].classList.add('shown')
83
84    changeDots()
85    
86  }
87
88  setInterval(() => {
89    btn_next.click()
90  }, 4000)
91}
92
93if (btn_prev) {
94  btn_prev.onclick = function(){
95    slides[i].classList.remove('shown')
96    i = i - 1
97    if(i < 0){
98      i = slides.length - 1;
99    }
100    slides[i].classList.add('shown')
101
102    changeDots()
103  }
104}
105
106slides.forEach((el, index) => {
107  el.setAttribute('data-slide-index', index)
108  let dot = document.createElement('button')
109  let dotClass = index == 0 ? 'dot active' : 'dot'
110
111  dot.setAttribute('class', dotClass)
112  dot.setAttribute('data-index', index)
113
114  dots.append(dot)
115});
116
117document.querySelectorAll('.dot').forEach((dot, index) => {
118  
119  dot.addEventListener('click', function(){
120
121    let dataIndex = this.getAttribute('data-index')
122
123    slides.forEach((el, index) => {
124
125      let slideIndex = el.getAttribute('data-slide-index')
126
127      if(dataIndex == slideIndex){
128        el.classList.add('shown')
129      } else {
130        el.classList.remove('shown')
131      }
132      
133    });	
134    
135    document.querySelectorAll('.dot').forEach((d) => {
136      d.classList.remove('active')
137    })
138    
139    this.classList.add('active')
140
141  })
142})
143
144window.addEventListener('scroll', handleScroll);
145
146let thirdScroll = false
147let halfScroll = false
148let fullScroll = false
149setTimeout( function(){
vendor: 399 bytes, lines 149-155
149
150  (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
151  m[i].l=1*new Date();
152  for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
153  k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
154  (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
155  ym(
15594830959
vendor: 117 bytes, lines 155-162
155, "init", {
156      clickmap:true,
157      trackLinks:true,
158      accurateTrackBounce:true,
159      webvisor:true
160  });
161
162  
162window.onscroll = function() {
163
164      let pageY = window.scrollY
165      let innerHeight = document.documentElement.scrollHeight;
166      let delta = innerHeight / pageY;
167    
168      if( delta >= 2 && thirdScroll == false ){
169        thirdScroll = true
170        ym(94830959,'reachGoal','partsScrollGoal1')
171      }
172    
173      if( delta <= 2 && delta >= 1.5 && halfScroll == false ){
174        halfScroll = true
175        ym(94830959,'reachGoal','partsScrollGoal2')
176      }
177    
178      if( delta <= 1.5 && fullScroll == false ){
179        fullScroll = true
180        ym(94830959,'reachGoal','partsScrollGoal3')
181      }
182    
183    }
184
185}, 3000 )

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.