PageSourceSearch

https://www.hks-cbf.hr/slike/hks-statistics-performance/fd4edf1bc9…a6e2455f8414d3c9900e9fd742a68b2976c31f8a.js

js hks-cbf.hr collected 2026-09-25 00:13:31 UTC 8,535 bytes, 87 lines download raw bytes

1/* Homepage Sofascore credit: native link, keyboard accessible, opens separately. */
2(()=>{
3  function linkLogo(){
4    if(!document.body.classList.contains('home')) return;
5    document.querySelectorAll('.hks-season-powered-logo').forEach(logo=>{
6      let link=logo;
7      if(logo.tagName!=='A'){
8        link=document.createElement('a');
9        link.className=logo.className;
10        link.innerHTML=logo.innerHTML;
11        logo.replaceWith(link);
12      }
13      link.href='https://www.sofascore.com/basketball/croatia';
14      link.target='_blank';
15      link.rel='noopener noreferrer';
16      link.setAttribute('aria-label','Sofascore – otvara se u novoj kartici');
17      link.title='Sofascore – otvara se u novoj kartici';
18    });
19  }
20  if(document.readyState==='loading') document.addEventListener('DOMContentLoaded',linkLogo,{once:true});
21  else linkLogo();
22})();
23/* HKS 2026./27. current league widgets: preserve markup, dimensions and style. */
24(()=>{
25 const path=location.pathname.replace(/\/+$/,'/');
26 const leagues={'/supersport-premijer-liga/':'579','/premijer-zenska-liga/':'580','/prva-muska-liga/':'28752'};
27 if(path!=='/'&&!leagues[path])return;
28 const seasons={'579':['80506','101330'],'580':['80507','101520'],'28752':['80650','101332']};
29 const fixtureIds={'579':'16872787,16872779,16872783,16872865,16872763,16872781,16872786,16872785,16872782,16872772,16872937,16872769,16872765,16872770,16872767,16872768,16872762,16872764,16872942,16872774,16872775,16872771,16872773,16872766,16872780,16872784,16872777,16872776,16872788,16872778,16872793,16872791,16872794,16872792,16872789,16872790,16872797,16872805,16872799,16872796,16872800,16872795,16872798,16872807,16872801,16872804,16872802,16872803,16872809,16872808,16872810,16872812,16872813,16872806,16872818,16872815,16872823,16872814,16872811,16872816,16872817,16872819,16872820,16872821,16872824,16872822,16872828,16872829,16872830,16872825,16872827,16872826,16872831,16872832,16872835,16872834,16872840,16872833,16872844,16872837,16872841,16872839,16872838,16872836,16872845,16872843,16872847,16872848,16872842,16872846,16872854,16872850,16872851,16872853,16872857,16872849,16872858,16872856,16872855,16872860,16872852,16872859,16872862,16872863,16872861,16872867,16872866,16872864,16872873,16872872,16872869,16872871,16872868,16872875,16872881,16872874,16872877,16872879,16872876,16872870,16872886,16872884,16872883,16872882,16872880,16872878,16872891,16872888,16872889,16872890,16872885,16872887','580':'16892654,16892495,16892507,16892504,16892502,16892506,16892510,16892498,16892496,16892501,16892494,16892503,16892497,16892505,16892493,16892511,16892508,16892500,16892499,16892509,16892514,16892513,16892515,16892516,16892512,16892519,16892520,16892521,16892518,16892517,16892523,16892522,16892524,16892525,16892526,16892530,16892528,16892531,16892527,16892529,16892532,16892534,16892535,16892536,16892533,16892541,16892539,16892540,16892538,16892537,16892543,16892542,16892545,16892544,16892549,16892548,16892550,16892547,16892551,16892546,16892552,16892555,16892556,16892553,16892554,16892559,16892560,16892557,16892562,16892558,16892563,16892568,16892565,16892561,16892564,16892567,16892570,16892566,16892571,16892569,16892580,16892574,16892573,16892572,16892576,16892577,16892583,16892575,16892579,16892578,16892585,16892586,16892581,16892584,16892582,16892591,16892588,16892590,16892587,16892589,16892596,16892592,16892595,16892594,16892593,16892599,16892601,16892597,16892600,16892598','28752':'16872894,16872895,16872965,16872897,16872896,16872893,16872892'};
30 let queued=false;
31 function update(){
32  queued=false;
33  document.querySelectorAll('iframe[src*="widgets.sofascore.com"]').forEach(frame=>{
34   let url;try{url=new URL(frame.getAttribute('src'),location.href);}catch(e){return;}
35   if(url.pathname.includes('/cuptree/')){
36    // There is no 2026./27. playoff tree yet. Keep its tab, without an old result.
37    const box=frame.closest('.elementor-widget-html')||frame;
38    box.hidden=true;box.style.setProperty('display','none','important');
39    if(frame.getAttribute('src')!=='about:blank')frame.setAttribute('src','about:blank');return;
40   }
41   const firstLeague=frame.closest('[data-elementor-id="79918"]');
42   if(firstLeague&&url.pathname.includes('/topPlayers/unique-tournament/579/')){
43    url.pathname=url.pathname.replace('/unique-tournament/579/','/unique-tournament/28752/').replace('/season/80506/','/season/80650/').replace('/season/101330/','/season/101332/');
44   }
45   Object.values(seasons).forEach(([oldSeason,newSeason])=>{url.pathname=url.pathname.replace('/season/'+oldSeason+'/','/season/'+newSeason+'/');});
46   if(url.pathname.includes('/fixtures/')&&fixtureIds[leagues[path]])url.searchParams.set('eventIds',fixtureIds[leagues[path]]);
47   const next=url.toString();if(frame.getAttribute('src')!==next)frame.setAttribute('src',next);
48   frame.dataset.hksCurrentSeason='2026-27';
49  });
50  document.querySelectorAll('a[href*="sofascore.com"]').forEach(a=>{let next=a.getAttribute('href');Object.values(seasons).forEach(([oldSeason,newSeason])=>{next=next.replace('#id:'+oldSeason,'#id:'+newSeason);});if(next!==a.getAttribute('href'))a.setAttribute('href',next);});
51 }
52 function queue(){if(!queued){queued=true;requestAnimationFrame(update);}}
53 new MutationObserver(queue).observe(document.documentElement,{subtree:true,childList:true,attributes:true,attributeFilter:['src']});
54 if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',update,{once:true});else update();
55})();
56
57/* HKS TEMPORARY PRESEASON NOTICE 2026/27.
58 * Widgets and their sources remain intact. Remove a season ID below when its data is ready.
59 * Set pendingSeasons=[] to remove all notices on the next page load.
60 */
61(()=>{
62 const pendingSeasons=['101330','101520','101332'];
63 if(!pendingSeasons.length||!['/','/supersport-premijer-liga/','/premijer-zenska-liga/','/prva-muska-liga/'].includes(location.pathname.replace(/\/+$/,'/')))return;
64 const style=document.createElement('style');
65 style.textContent='.hks-sofa-preseason-host{position:relative!important}.hks-sofa-preseason-frame{visibility:hidden!important}.hks-sofa-preseason-notice{position:absolute;box-sizing:border-box;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px 20px;background:#fff;border:1px solid #e7edf3;border-radius:16px;text-align:center;font-family:inherit;color:#102d50;line-height:1.5}.hks-sofa-preseason-notice strong{font-size:17px;font-weight:700;line-height:1.35;color:#102d50}.hks-sofa-preseason-notice span{max-width:250px;font-size:14px;font-weight:400;color:#617084}';
66 document.head.appendChild(style);
67 const items=new Map();
68 function position(frame,notice){notice.style.left=frame.offsetLeft+'px';notice.style.top=frame.offsetTop+'px';notice.style.width=frame.offsetWidth+'px';notice.style.height=frame.offsetHeight+'px';}
69 const resize=new ResizeObserver(()=>items.forEach((notice,frame)=>position(frame,notice)));
70 function cover(){
71  document.querySelectorAll('iframe[src*="widgets.sofascore.com"][src*="/topPlayers/"]').forEach(frame=>{
72   if(items.has(frame)||!pendingSeasons.some(id=>
72frame.src.includes('/season/'+id+'/')))return;
73   const host=frame.parentElement;
74   host.classList.add('hks-sofa-preseason-host');
75   frame.classList.add('hks-sofa-preseason-frame');
76   frame.setAttribute('aria-hidden','true');
77   const notice=document.createElement('section');notice.className='hks-sofa-preseason-notice';notice.style.setProperty('display','flex','important');
78   const title=document.createElement('strong');title.textContent='Natjecanje još nije počelo.';
79   const text=document.createElement('span');text.textContent='Statistika će biti dostupna nakon prvog kola.';text.style.setProperty('font-size','14px','important');text.style.setProperty('line-height','1.5','important');text.style.setProperty('font-weight','400','important');
80   notice.append(title,text);host.appendChild(notice);items.set(frame,notice);position(frame,notice);resize.observe(frame);resize.observe(host);
81  });
82 }
83 let queued=false;
84 new MutationObserver(()=>{if(!queued){queued=true;requestAnimationFrame(()=>{queued=false;cover();});}}).observe(document.documentElement,{subtree:true,childList:true,attributes:true,attributeFilter:['src']});
85 if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',cover,{once:true});else cover();
86})();
87/* END HKS TEMPORARY PRESEASON NOTICE */

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.