PageSourceSearch

https://www.syfy.com/sites/syfy/files/js/js_HBRzMnAVZQqJKmz3zeEP8L…e64L-ib3e0B7L66NyOc1_CI3mFwddNxHC-H_AUgdeJe

js syfy.com collected 2026-09-24 08:28:31 UTC 15,135 bytes, 7 lines download raw bytes

1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
2((Drupal,drupalSettings)=>{'use strict';const launchDarkly=(Drupal.launchDarkly=Drupal.launchDarkly||{});const ldClientSideId=drupalSettings.ls_launchdarkly?.client_side_id;const cachedClients=new Map();const cachedFlagValues=new Map();function createFallbackClient(){return {waitUntilReady:()=>Promise.resolve(),variationDetail:(featureFlag,defaultVar)=>Promise.resolve({value:defaultVar,variationIndex:0,reason:{kind:'ERROR',errorKind:'CLIENT_NOT_READY'},flagName:featureFlag})};}function initializeClient(ldClientSideId,user){const cacheKey=`${ldClientSideId}::${user.key}`;if(cachedClients.has(cacheKey))return cachedClients.get(cacheKey);if(typeof LDClient==='undefined'||typeof LDClient.initialize!=='function'){console.error('LaunchDarkly client is not available. Using fallback client.');return createFallbackClient();}try{const client=LDClient.initialize(ldClientSideId,user);cachedClients.set(cacheKey,client);return client;}catch(error){console.error('Error initializing LaunchDarkly client:',error);return createFallbackClient();}}function handleError(featureFlag,defaultVariation,error,errorKind='UNKNOWN_ERROR'){console.error(`LaunchDarkly error (${errorKind}):`,error);return {value:defaultVariation,variationIndex:0,reason:{kind:'ERROR',errorKind:error.message||errorKind},flagName:featureFlag};}launchDarkly.getFlag=async(featureFlag,defaultVariation,includeDetails=false)=>{try{if(typeof LDClient==='undefined'||typeof LDClient.initialize!=='function')throw new Error('LaunchDarkly client not loaded');if(!ldClientSideId)throw new Error('LaunchDarkly client side ID not available');const mParticleId=await Drupal.mParticle.getMparticleId();const user={kind:'user',key:mParticleId};const cacheKey=`${user.key}::${ldClientSideId}::${featureFlag}::${defaultVariation}`;if(cachedFlagValues.has(cacheKey)){const details=cachedFlagValues.get(cacheKey);return includeDetails?details:details.value;}const client=initializeClient(ldClientSideId,user);let details;try{await client.waitUntilReady();const variationDetails=await client.variationDetail(featureFlag,defaultVariation);variationDetails.flagName=featureFlag;details=variationDetails;}catch(clientError){details=handleError(featureFlag,defaultVariation,clientError,'CLIENT_ERROR');}cachedFlagValues.set(cacheKey,details);return includeDetails?details:details.value;}catch(error){const fallbackDetails=handleError(featureFlag,defaultVariation,error);return includeDetails?fallbackDetails:defaultVariation;}};})(Drupal,drupalSettings);;
3((Drupal)=>{'use strict';Drupal.behaviors.mParticlePeacockSubscription={async attach(context,{ls_mparticle:{peacockAudienceId}}){const audience_ids=await Drupal.mParticle.getUserAudiences();audience_ids.includes(peacockAudienceId)&&console.log('[LS mParticle] The user is a Peacock subscriber',(await Drupal.mParticle.getMparticleUser()).getUserIdentities());}};})(Drupal);;
4((Drupal,once)=>{'use strict';const mParticle=(Drupal.mParticle=Drupal.mParticle||{});Drupal.behaviors.lsMparticleClickHelper={attach(context,settings){mParticle.trackClickEvent('.analytics-click-tracking article a:not(.ab-test-block__link)',(clickedElement)=>{const attributes={'Content Position':mParticle.getContentPosition(clickedElement.closest('.carousel__item')),'Custom Shelf Title':mParticle.getSectionTitle(clickedElement),'Item Clicked Name':mParticle.getContentHeadline(clickedElement)};if(clickedElement.href.indexOf('peacocktv.com')>-1)attributes['URL']=clickedElement.href;return attributes;},context);}};})(Drupal,once);;
5((Drupal,once)=>{'use strict';const mParticle=(Drupal.mParticle=Drupal.mParticle||{});function addHeaderClickTracking(context){mParticle.trackClickEvent('.header__logo',()=>({'Custom Shelf Title':'Header','Item Clicked Name':'Logo'}),context);const selector='nav#block-mainmenu li:not(.menu-item--expanded) > a:not(.parent-all):not(.expanded-item-link-processed)';const clickTrackingElements=context.querySelectorAll(selector);clickTrackingElements.forEach((clickTrackingElement)=>{clickTrackingElement.addEventListener('click',function(event){const link=event.target;const breadcrumbs=[mParticle.trackingTextForAnchor(link)];const headerItem=link.closest('.menu-item--expanded');if(headerItem){const headerLink=headerItem.querySelector('a[role="menuitem"]');if(headerLink)breadcrumbs.push(mParticle.trackingTextForAnchor(headerLink));}mParticle.trackEvent({type:'Navigation',name:'Click Action',attributes:{'Custom Shelf Title':'Header','Item Clicked Name':breadcrumbs.reverse().join(' | '),URL:link.href}});});});mParticle.trackClickEvent('.identity__insider__wrapper .identity__menu-cta a',(clickedElement)=>({'Custom Shelf Title':'Header','Item Clicked Name':`Navigation: ${mParticle.trackingTextForAnchor(clickedElement)}`}),context);const myInsiderHubButtonParent=document.querySelector('.identity__profile__wrapper .identity__menu-cta');
5if(myInsiderHubButtonParent)myInsiderHubButtonParent.addEventListener('click',function(event){if(event.target.tagName==='A'){const link=event.target;const linkText=mParticle.trackingTextForAnchor(link);mParticle.trackEvent({type:'Navigation',name:'Click Action',attributes:{'Custom Shelf Title':'Header','Item Clicked Name':'Navigation: '+linkText}});}});}function addInsiderOverlayTracking(context){mParticle.trackClickEvent('#insider-exclusive__subscription__link a',(clickedElement)=>({'Custom Shelf Title':'Unlock Bravo Insider Exclusive','Item Clicked Name':clickedElement.innerText}),context);}function addFooterClickTracking(context){const clickTrackingElements=context.querySelectorAll('footer.site-footer a:not([data-identity-context])');clickTrackingElements.forEach((clickTrackingElement)=>{clickTrackingElement.addEventListener('click',function(){const breadcrumbs=[mParticle.trackingTextForAnchor(this)];const menuItem=this.closest('.primary-menu-item');if(menuItem)breadcrumbs.push(menuItem.querySelector('span').innerText.trim());mParticle.trackEvent({type:'Navigation',name:'Click Action',attributes:{'Custom Shelf Title':'Footer','Item Clicked Name':breadcrumbs.reverse().join(' | '),URL:this.href}});});});}Drupal.behaviors.lsMparticlePage={attach(context,settings){if(!mParticle?.trackEvent&&!mParticle?.trackClickEvent)return;const [body]=once('mparticle-page-load','body',context);if(body){const additionalAttributes=settings?.ls_mparticle?.additional_attributes||{};const attributes={URL:document.location.href,...additionalAttributes};const featureFlag=settings.ab_tests?.deciderSettings?.feature_flag;if(featureFlag)attributes['LD Feature Flag']=featureFlag;mParticle.trackEvent({type:'Navigation',name:'Page Load',attributes,customFlags:{'Facebook.EventSourceUrl':document.location.href}});mParticle.trackClickEvent('.page-show-main .teaser-promo--hero a[href*="peacocktv.com"]',(clickedElement)=>({'Custom Shelf Title':'Show Hero','Item Clicked Name':'Stream Now',URL:clickedElement.href}),context);}const [domElement]=once('mparticle-click',context instanceof Document?document.body:context);if(domElement){mParticle.trackClickEvent('[data-identity-context]',(clickedElement)=>{const attributes={URL:document.location.href};if(clickedElement){attributes['Item Clicked Name']=clickedElement.dataset.identityContext;attributes['Custom Shelf Title']=clickedElement.dataset.identityShelfTitle;}else{console.warn('clickedElement is null in trackClickEvent',new Error().stack);attributes['Item Clicked Name']='unknown';attributes['Custom Shelf Title']='unknown';}return attributes;},domElement);addHeaderClickTracking(domElement);addInsiderOverlayTracking(domElement);addFooterClickTracking(domElement);}}};mParticle.toCapitalized=(text)=>{return text.toLowerCase().split(' ').map((word)=>word.charAt(0).toUpperCase()+word.slice(1)).join(' ');};mParticle.getContentPositionAmongSameElements=(element,selector,parentElement)=>{const elements=parentElement.querySelectorAll(selector);const elementsArray=Array.from(elements);return elementsArray.indexOf(element)+1;};mParticle.getContentPosition=(element)=>{let position=0;let children=element.parentNode.children;while(children[position]!==element)position++;position++;return position;};mParticle.heroCarouselPosition=(element)=>{return element.getAttribute('data-swiper-slide-index')?parseInt(element.getAttribute('data-swiper-slide-index'))+1:mParticle.getContentPosition(element);};mParticle.getContentHeadline=(element)=>{return element.querySelector('.headline')?.innerText?element.querySelector('.headline').innerText.trim():element.closest('.teaser').querySelector('.teaser__meta-wrapper .headline').innerText?element.closest('.teaser').querySelector('.teaser__meta-wrapper .headline').innerText.trim():'';};mParticle.trackingTextForAnchor=(element)=>{const article=element.closest('article');if(article){const headline=article.querySelector('.headline');if(headline)return headline.innerText.trim();}const text=element.innerText.trim();if(text.length)return text;const title=element.getAttribute('title');if(title)return title;const href=element.getAttribute('href');if(href)try{const url=new URL(href);return url.hostname;}catch(e){return window.location.hostname;}return 'Unk';};mParticle.trackingTextWithInnerContent=(element)=>{let text=element.textContent.trim();const img=element.querySelector('img');if(img&&img.alt)text+=' '+img.alt.trim();return text;};mParticle.getInsiderLandingSectionTitle=(element)=>{const sectionClass=element.closest('.insider-section')?.classList[1];switch(sectionClass){case 'insider-section__hero-panel':return 'Hero';case 'insider-section__virtual-events-panel':return 'Virtual Events';case 'insider-section__live-events-panel':return 'Live Events';case 'insider-section__upcoming-events-panel':return 'Upcoming Events';case 'insider-section__peacock-panel':return 'Peacock';case 'insider-section__perks-panel':return 'Perks';case 'insider-section__editorial-panel':return 'Editorial';case 'insider-section__plans-panel':return 'Plans';default:return 'Insider Landing Section';}};mParticle.getSectionTitle=(element)=>{return element.closest('.site-section-wrapper').querySelector('.section__title')?.innerText?element.closest('.site-section-wrapper').querySelector('.section__title').innerText.trim():element.closest('.homepage-section').querySelector('.section__title .inner').innerText?element.closest('.homepage-section').querySelector('.section__title .inner').innerText.trim():element.closest('.blog-post-section').querySelector('.section__title .inner').innerText.trim()?element.closest('.blog-post-section').querySelector('.section__title .inner').innerText.trim():element.closest('.section__title').innerText?element.closest('.section__title').innerText.trim():'';};})(Drupal,once);;
6(function(drupalSettings,$,Drupal,once,Identity){'use strict';Drupal.behaviors.oneTrustInit={attach:function(context,settings){$(once('onetrust-init','#ot-sdk-btn')).click((e)=>{if(typeof window.OneTrust==='object')e.preventDefault();});const [canDo]=once('lsOneTrust_lazy_loaded','body',context);if(canDo){const listenerWithCondition=(waitForCallback)=>async(event)=>{if(!window.OneTrust)return;await Drupal.waitFor(()=>typeof window.OneTrust!=='undefined'&&waitForCallback(event));if(Drupal.oneTrust.hasConsent()){window.OneTrust.AllowAll();context.querySelectorAll('script[src="text/plain"]').forEach((el)=>{console.log('[OneTrust] embed fallback. Swapping script type text/plain with text/javascript.',el);el.type='text/javascript';});context.querySelectorAll('iframe[data-src]').forEach((el)=>{console.log('[OneTrust] embed fallback. Swapping iframe data-src with src.',el);el.src=el.dataset.src;el.removeAttribute('data-src');});}};document.addEventListener('ab_tests:abTestFinished',listenerWithCondition(()=>document.querySelector('[data-ab-tests-decider-status="success"]')!==null));document.addEventListener('ls_continuous_scroll:postLoaded',listenerWithCondition((event)=>typeof document.querySelectorAll('[data-view-mode="lazyloaded"]')[event.detail.postNumber]!=='undefined'));}}};Drupal.oneTrust=Drupal.oneTrust?Drupal.oneTrust:{};Drupal.oneTrust.hasConsent=function(){if(typeof window.OneTrust!=='object')return false;const categoryId=drupalSettings?.lsOnetrust?.optanonCategoryId;if(!categoryId)return false;try{const domainData=window.OneTrust.GetDomainData();if(!domainData||!domainData.Groups)return false;
6if(domainData?.ForceConsent===true&&!window.OneTrust.IsAlertBoxClosedAndValid())return false;const socialMediaCategory=domainData.Groups.find((group)=>group.CustomGroupId===categoryId);if(!socialMediaCategory)return false;return (socialMediaCategory.HasConsentOptOut===false||socialMediaCategory.Status==='always active');}catch(error){console.warn('Error checking OneTrust social media consent:',error);return false;}};})(drupalSettings,jQuery,Drupal,once,window.nbc?.identity);;
7(function(document,PARSELY){'use strict';let urlref=window.location.href;function register(){document.addEventListener('lsVideoStart',async(event)=>{const video=event.detail?.video;log('Video Start');console.log('yielding in jwplayer lsVideoStart event');await scheduler.yield();handleVideoStart(video);});document.addEventListener('lsVideoPause',async(event)=>{const video=event.detail?.video;log('Video Pause');console.log('yielding in jwplayer lsVideoPause event');await scheduler.yield();handleVideoPause(video);});document.addEventListener('lsVideoUnpause',async(event)=>{const video=event.detail?.video;log('Video Unpause');console.log('yielding in jwplayer lsVideoUnpause event');await scheduler.yield();handleVideoStart(video);});document.addEventListener('lsPlaylistActiveGuidChange',async(event)=>{const {video,context}=event.detail;log('Playlist Active Guid Change',context);console.log('yielding in jwplayer lsPlaylistActiveGuidChange event');await scheduler.yield();handlePlaylistActiveGuidChange(video,context);});}function handleVideoStart(video){const metadata={};const articleSection=getPageArticleSection();if(!video?.guid)return;metadata.title=video?.title;metadata.image_url=video?.thumbnailUrl;metadata.duration=video?.durationInSeconds?video?.durationInSeconds*1000:null;metadata.pub_date_tmsp=video?.availableDate*1000;metadata.tags=[video?.show,video?.subType].concat(video?.keywords).filter(Boolean).filter((value,index,self)=>self.indexOf(value)===index);if(articleSection)metadata.section=articleSection;PARSELY?.video?.trackPlay?.(video.guid,metadata);}function handleVideoPause(video){if(!video?.guid)return;PARSELY?.video?.trackPause?.(video.guid);}function handlePlaylistActiveGuidChange(video,context){const url=new URL(video.path,document.location.origin).toString();if(context==='embed')return;PARSELY?.beacon?.trackPageView?.({url,urlref,js:1});urlref=url;}function getPageArticleSection(){return document.querySelector('[name=parsely-section]')?.getAttribute('content');}function log(message,obj=null,{prefix='lifestyle parse.ly'}={}){if(drupalSettings.ls_parsely_media.debug){const output=`[${prefix}]: ${message}`;if(obj===null)console.log(output);else console.log(output,obj);}}register();})(document,(window.PARSELY=window.PARSELY||{}),drupalSettings);;

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.