PageSourceSearch

https://anker.com.sg/cdn/shop/t/14/assets/cookies-banner.js?v=66617742096924061041765794013

js anker.com.sg collected 2026-09-29 15:10:54 UTC 2,009 bytes, 2 lines download raw bytes

1class CookiesBanner extends HTMLElement{constructor(){super(),this.initCookieBanner(),this.attactEvents=!1}disconnectedCallback(){this.removeEvents()}initCookieBanner(){const userCanBeTracked=window.Shopify.customerPrivacy.userCanBeTracked(),userTrackingConsent=window.Shopify.customerPrivacy.getTrackingConsent();!userCanBeTracked&&userTrackingConsent==="no_interaction"&&this.showBanner()}removeEvents(){const acceptButton=this.querySelector(".cookies-banner__button--accept"),declineButton=this.querySelector(".cookies-banner__button--decline");acceptButton&&acceptButton.removeEventListener("click",this.onAcceptHandler),declineButton&&declineButton.removeEventListener("click",this.onDeclineHandler)}hideBanner(removeEvent=!0){this.classList.remove("open"),removeEvent&&!Shopify.designMode&&this.removeEvents()}showBanner(){Shopify.designMode?this.afterShowBanner():fetch(window.Shopify.routes.root+"?section_id=cookies-banner&view=ajax").then(response=>response.text()).then(responseText=>{const cookiesBannerInner=getDomHtmlFromText(responseText,".cookies-banner__inner");this.appendChild(cookiesBannerInner),this.afterShowBanner()})}openBanner(){this.classList.add("open")}afterShowBanner(){this.openBanner(),this.attactEvents||(this.onAcceptHandler=this.onAccept.bind(this),this.onDeclineHandler=this.onDecline.bind(this),this.querySelector(".cookies-banner__button--accept").addEventListener("click",this.onAcceptHandler),this.querySelector(".cookies-banner__button--decline").addEventListener("click",this.onDeclineHandler),this.attactEvents=!0)}onAccept(e){window.Shopify.customerPrivacy.setTrackingConsent(!0,this.hideBanner.bind(this))}onDecline(){window.Shopify.customerPrivacy.setTrackingConsent(!1,this.hideBanner.bind(this))}}window.Shopify.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],function(error){if(error)throw error;customElements.define("cookies-banner",CookiesBanner)});
2//# sourceMappingURL=/cdn/shop/t/14/assets/cookies-banner.js.map?v=66617742096924061041765794013

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.