PageSourceSearch

https://www.xsens.com/hubfs/hub_generated/template_assets/1/175286965112/1789975139493/template_main.min.js

js xsens.com collected 2026-10-01 10:33:42 UTC 3,612 bytes, 2 lines download raw bytes

1function initOffsetAnchorScrolling(){document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"])').forEach(link=>{link.addEventListener("click",event=>{const targetInfo=getAnchorTarget(link);targetInfo&&(event.preventDefault(),scrollElementIntoViewWithOffset(targetInfo.target),updateUrlHash(targetInfo.hash))})})}function getAnchorTarget(link){try{const url=new URL(link.getAttribute("href"),window.location.href);if(!url.hash)return null;if(!(url.pathname.replace(/\/$/,"")===window.location.pathname.replace(/\/$/,"")&&url.hostname===window.location.hostname))return null;const id=decodeURIComponent(url.hash.substring(1)),target=document.getElementById(id);return target?{target:target,hash:url.hash}:null}catch(error){return console.error("Failed to parse anchor link href",error),null}}function scrollElementIntoViewWithOffset(element,behavior="smooth"){const offset=getNavOffset(),targetPosition=element.getBoundingClientRect().top+window.pageYOffset,scrollPosition=Math.max(targetPosition-offset,0);window.scrollTo({top:scrollPosition,behavior:behavior})}function getNavOffset(){const nav=document.querySelector("nav");if(!nav)return 0;const styles=window.getComputedStyle(nav),marginBottom=parseFloat(styles.marginBottom)||0;return nav.offsetHeight+marginBottom+20}function updateUrlHash(hash){if(!hash)return;const newUrl=`${window.location.pathname}${window.location.search}${hash}`;window.location.hash!==hash&&(history.pushState?history.pushState(null,"",newUrl):window.location.hash=hash.substring(1))}function scrollToExistingHash(){if(!window.location.hash)return;const id=decodeURIComponent(window.location.hash.substring(1)),target=document.getElementById(id);target&&scrollElementIntoViewWithOffset(target,"auto")}function closeActivePopup(){$(".popup__wrapper.open .popup-container").addClass("slide-out"),setTimeout(function(){$(".popup-container.slide-out").removeClass("slide-out"),$(".popup__wrapper.open").removeClass("open")},500),unbockBodyScroll()}function blockBodyScroll(){$("html").addClass("scroll-blocked")}function unbockBodyScroll(){$("html").removeClass("scroll-blocked")}$(function(){Fancybox.bind(),console.log("fancybox is binded")}),$(".open-popup").on("click",function(e){console.log("opening popup");let target=$(this).attr("data-target");$(target).addClass("open"),blockBodyScroll(),e.preventDefault()}),$(".pc__close").on("click",closeActivePopup),$(".popup__wrapper").on("click",function(e){$(e.target).closest(".popup-container").length||$(".popup__wrapper").hasClass("open")&&closeActivePopup()}),document.addEventListener("DOMContentLoaded",()=>{initOffsetAnchorScrolling()}),window.addEventListener("load",()=>{scrollToExistingHash()});let applicationArea=sessionStorage.getItem("applicationArea");console.log("applicationArea:",applicationArea),window.addEventListener("message",event=>{if("hsFormCallback"===event.data.type&&"onFormReady"===event.data.eventName){const formId=event.data.id;document.querySelectorAll(`form.hs-form[data-form-id="${formId}"]`).forEach(form=>{if(form.hasAttribute("data-defaulted-application-area"))return;const field=form.querySelector('input[name="application_area__c"], select[name="application_area__c"]');field&&(field.value=applicationArea,field.addEventListener("change",()=>{console.log(`application_area__c changed to: ${field.value}`)}),field.dispatchEvent(new Event("change",{bubbles:!0}))),form.setAttribute("data-defaulted-application-area","true")})}});
2//# sourceURL=https://3446270.fs1.hubspotusercontent-na1.net/hubfs/3446270/hub_generated/template_assets/1/175286965112/1789975139493/template_main.js

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.