PageSourceSearch

https://www.rubic.no/wp-content/cache/breeze-minification/js/breez…304-assets-v2-js-rubic-v3.js?ver=1790210341

js rubic.no collected 2026-09-24 10:11:22 UTC 6,863 bytes, 14 lines download raw bytes

1(function(){'use strict';var burger=document.querySelector('.rbx-burger');var menu=document.getElementById('rbxMobileMenu');var lastFocus=null;function menuFocusables(){return Array.prototype.slice.call(menu.querySelectorAll('a[href], button:not([disabled])')).filter(function(el){return el.offsetParent!==null||menu.classList.contains('open')})}
2function openMenu(){lastFocus=document.activeElement;menu.hidden=!1;menu.classList.add('open');document.body.style.overflow='hidden';burger.setAttribute('aria-expanded','true');var f=menuFocusables();if(f.length)f[0].focus();}
3function closeMenu(){menu.classList.remove('open');menu.hidden=!0;document.body.style.overflow='';burger.setAttribute('aria-expanded','false');if(lastFocus)lastFocus.focus();}
4if(burger&&menu){burger.setAttribute('aria-expanded','false');burger.addEventListener('click',openMenu);menu.querySelector('.rbx-mobilemenu-close').addEventListener('click',closeMenu);menu.addEventListener('keydown',function(e){if(e.key==='Escape'){closeMenu();return}
5if(e.key!=='Tab')return;var f=menuFocusables();if(!f.length)return;var first=f[0],last=f[f.length-1];if(e.shiftKey&&document.activeElement===first){e.preventDefault();last.focus()}else if(!e.shiftKey&&document.activeElement===last){e.preventDefault();first.focus()}});menu.addEventListener('click',function(e){if(e.target.closest('a[href]'))closeMenu();})}
6document.querySelectorAll('.rbx-navdrop').forEach(function(drop){var btn=drop.querySelector('.rbx-navdrop-btn');if(!btn)return;function set(open){btn.setAttribute('aria-expanded',open?'true':'false')}
7drop.addEventListener('mouseenter',function(){set(!0)});drop.addEventListener('mouseleave',function(){set(!1)});drop.addEventListener('focusin',function(){set(!0)});drop.addEventListener('focusout',function(){if(!drop.contains(document.activeElement))set(!1);})});var revealEls=document.querySelectorAll('.rb-reveal:not(.in)');if(revealEls.length&&'IntersectionObserver' in window){var revealIo=new IntersectionObserver(function(entries){entries.forEach(function(en){if(!en.isIntersecting)return;en.target.classList.add('in');revealIo.unobserve(en.target)})},{threshold:0.2});revealEls.forEach(function(el){revealIo.observe(el)})}else{revealEls.forEach(function(el){el.classList.add('in')})}
8document.querySelectorAll('.rbx-faq').forEach(function(faq){faq.addEventListener('toggle',function(e){if(!e.target.open)return;faq.querySelectorAll('details[open]').forEach(function(d){if(d!==e.target)d.open=!1})},!0)});var counters=document.querySelectorAll('[data-countup]');if(counters.length){function animate(el){var target=parseInt(el.getAttribute('data-countup'),10)||0;var dur=1200,start=null;function step(ts){if(!start)start=ts;var p=Math.min((ts-start)/dur,1);var eased=1-Math.pow(1-p,3);el.textContent=Math.round(target*eased).toLocaleString('no-NO');if(p<1)requestAnimationFrame(step);}
9requestAnimationFrame(step)}
10if('IntersectionObserver' in window){var countIo=new IntersectionObserver(function(entries){entries.forEach(function(en){if(!en.isIntersecting)return;animate(en.target);countIo.unobserve(en.target)})},{threshold:0.5});counters.forEach(function(el){countIo.observe(el)})}else{counters.forEach(function(el){el.textContent=(parseInt(el.getAttribute('data-countup'),10)||0).toLocaleString('no-NO')})}}
11document.addEventListener('click',function(e){var a=e.target.closest('a.rbx-btn, .rbx-header-cta a, .rbx-mobilemenu-cta a');if(!a||!a.href)return;window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:'cta_click',cta_text:(a.textContent||'').trim().replace(/\s+/g,' ').slice(0,80),cta_url:a.href,page_path:location.pathname})});window.addEventListener('message',function(e){if(!e.data||e.data.type!=='hsFormCallback')return;window.dataLayer=window.dataLayer||[];if(e.data.eventName==='onFormReady'){window.dataLayer.push({event:'lead_form_view',hs_form_id:e.data.id||'',page_path:location.pathname})}
12if(e.data.eventName==='onFormSubmitted'){window.dataLayer.push({event:'lead_form_submit',hs_form_id:e.data.id||'',page_path:location.pathname})}});function dl(obj){window.dataLayer=window.dataLayer||[];obj.page_path=location.pathname;window.dataLayer.push(obj)}(function(){var p=location.pathname;var type='annet',segment='';if(p==='/'||p===''){type='forside'}else if(/^\/(sport|medlem|arrangor|regnskap)\//.test(p+'/')){type='produktside';segment=p.split('/')[1]}else if(/^\/moduler\/./.test(p)){type='modulside'}else if(/^\/(lokasjon|event)\//.test(p+'/')){type='standalone-produkt';segment=p.split('/')[1]}else if(/^\/(demo|book-demo|prov-gratis|bytte-til-rubic)\//.test(p+'/')){type='landingsside'}else if(/^\/prisliste\//.test(p+'/')){type='prisliste'}else if(/^\/(blogg|guider|kundehistorier)\//.test(p+'/')){type='innhold'}else if(document.body.classList.contains('single-post')){type='innhold'}
13dl({event:'page_meta',page_type:type,page_segment:segment})})();(function(){var marks=[25,50,75,90],fired={};function onScroll(){var doc=document.documentElement;var max=doc.scrollHeight-window.innerHeight;if(max<=0)return;var pct=Math.round((window.scrollY/max)*100);marks.forEach(function(m){if(pct>=m&&!fired[m]){fired[m]=!0;dl({event:'scroll_depth',depth:m})}});if(fired[90])window.removeEventListener('scroll',onScroll);}
14window.addEventListener('scroll',onScroll,{passive:!0})})();window.addEventListener('message',function(e){var d=e.data;var booked=(d&&d.meetingBookSucceeded)||(typeof d==='string'&&d.indexOf('meetingBookSucceeded')!==-1);if(booked)dl({event:'meeting_booked'})});
14(function(){var ifr=document.querySelector('.rubic-meetings-iframe, iframe[src*="meetings-eu1.hubspot.com"]');if(!ifr||!('IntersectionObserver' in window))return;var io=new IntersectionObserver(function(entries){entries.forEach(function(en){if(!en.isIntersecting)return;dl({event:'booking_widget_view'});io.disconnect()})},{threshold:0.3});io.observe(ifr)})();document.addEventListener('click',function(e){var a=e.target.closest('a[href]');if(!a)return;var href=a.href||'';if(/(?:id|app|activity|location|event)\.rubic\.no/.test(href)){dl({event:'login_click',link_url:href})}else if(/^tel:/.test(a.getAttribute('href')||'')){dl({event:'contact_click',contact_type:'telefon'})}else if(/^mailto:/.test(a.getAttribute('href')||'')){dl({event:'contact_click',contact_type:'epost'})}else if(/zendesk\.com|ecit\.com/.test(href)){dl({event:'outbound_click',link_url:href})}});document.addEventListener('click',function(e){var seg=e.target.closest('a.fp-seg');if(!seg)return;var h=seg.querySelector('h3');dl({event:'cta_click',cta_text:'Segmentvelger: '+(h?(h.textContent||'').trim():''),cta_url:seg.href})});document.querySelectorAll('.rbx-faq').forEach(function(faq){faq.addEventListener('toggle',function(e){if(!e.target.open)return;var q=e.target.querySelector('summary');dl({event:'faq_toggle',faq_question:q?(q.textContent||'').trim().slice(0,100):''})},!0)})})()

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.