PageSourceSearch

https://www.kayak.co.uk/news/wp-content/plugins/r9-components/public/AnchorLink/scripts.js?ver=36699431923

js kayak.co.uk collected 2026-10-01 10:28:28 UTC 1,833 bytes, 2 lines download raw bytes

1(()=>{"use strict";function t(t){return Math.floor(t.getBoundingClientRect().top)}new class{constructor(){return void 0!==window.r9ComponentsAnchorLinkService?window.r9ComponentsAnchorLinkService:(window.r9ComponentsAnchorLinkService=this,this._scrollHandler=null,this._isOverridden=!1,this.init(),this)}init(){this.setupAnchorLinks()}setupAnchorLinks(){document.addEventListener("click",t=>{const e=t.target.closest('a[href^="#"]');e&&this.handleAnchorClick(t,e)})}handleAnchorClick(t,e){t.preventDefault();const n=e.getAttribute("href")?.match(/^#(.+)$/)?.[1];n&&0!==n.length&&(this._scrollHandler&&this._isOverridden?this._scrollHandler(n,t):this.defaultScrollToAnchor(n))}subscribe(t,e=!0){"function"==typeof t?(this._scrollHandler=t,this._isOverridden=e):console.warn("AnchorLinkService: subscribe expects a function")}unsubscribe(){this._scrollHandler=null,this._isOverridden=!1}isOverridden(){return this._isOverridden}scrollTo(t){this._scrollHandler&&this._isOverridden?this._scrollHandler(t,null):this.defaultScrollToAnchor(t)}defaultScrollToAnchor(e){!function(e,n=0){if(!e||e.length<=1)return;const o=document.getElementById(e);if(!o)return;setTimeout(()=>{const e=t(o)-n;window.scrollBy({top:e,left:0,behavior:"smooth"})},0);let r=0;const i=setInterval(()=>{r++;const s=window.innerHeight+window.scrollY>=document.body.offsetHeight-2;(t(o)-n===0||s||r>=20)&&(o.tabIndex="-1",function(t,e={}){if(!t)return;t.setAttribute("data-no-focus-outline","true"),t.focus(e);const n=()=>{t.removeAttribute("data-no-focus-outline"),t.removeEventListener("blur",n)};t.addEventListener("blur",n,{once:!0})}(o,{preventScroll:!0,focusVisible:!1}),window.location.hash!==`#${e}`&&window.history.pushState("","",window.location.pathname+window.location.search+`#${e}`),clearInterval(i))},50)}(e,0)}}})();
2//# sourceMappingURL=scripts.js.map

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.