PageSourceSearch

https://madamenoire.com/wp-content/plugins/ione-modules/build/ione4/blocks/video-player/index.js?ver=924dc76

js madamenoire.com collected 2026-10-02 03:42:10 UTC 4,457 bytes, 1 lines download raw bytes

1(()=>{"use strict";iOneScriptLoader.mediumPriority(()=>{var e,t,i,n,a=new Set;if((e=function(e,t){this.initialState=e,this.possibleStates=t,this.state=null,Object.keys(this.possibleStates).forEach(function(e){this.possibleStates[e].stateMachine=this},this)}).prototype.step=function(){null===this.state&&(this.state=this.initialState,this.possibleStates[this.state].enter()),this.possibleStates[this.state].execute()},e.prototype.transition=function(e){this.state=e,this.possibleStates[this.state].enter()},n={outOfView:{enter:function(){try{window.theoplayer.pause()}catch(e){}},execute:function(){this.stateMachine.entry.isIntersecting&&this.stateMachine.transition("inView")}},inView:{enter:function(){try{window.theoplayer.play()}catch(e){}},execute:function(){this.stateMachine.entry.isIntersecting||this.stateMachine.transition("outOfView")}},unseen:{enter:function(){},execute:function(){this.stateMachine.entry.isIntersecting&&this.stateMachine.transition("inView")}}},i=document.querySelector(".ione4-video-player ul")){var s=document.getElementById("ione4-video-container");if(s){var o=new IntersectionObserver(function(e,i){e.forEach(function(e){t.entry=e,t.step()})},{rootMargin:"0px",threshold:.5}),r=document.querySelector(".ione4-video-player");r&&(o.observe(r),t=new e("unseen",n)),fetch("https://api.zype.com/playlists/"+videoHubWidget.playlist_id+"/videos?api_key="+videoHubWidget.read_only_key,{method:"GET",headers:{Accept:"application/json"}}).then(function(e){return e.json()}).then(function(e){var t=e.response;if(0!=t.length){var n=0;t.forEach(function(e){var a=document.createElement("li"),s=document.createElement("img"),o=document.createElement("div"),r=document.createElement("span"),d=document.createElement("span");if(s.src=e.thumbnails[0].url,e.categories&&e.categories.length>0&&(d.classList.add("ione4-video-player__thumbnails-category"),d.innerText=e.categories[0].title),r.classList.add("ione4-video-player__thumbnails-title"),e.title.length>59){for(var l=e.title.split(" "),p=0,h="",u=0;u<l.length&&(p+=l[u].length)<52;u++)h+=l[u]+" ";r.innerText=h+"..."}else r.innerText=e.title;a.dataset.videoId=e._id,a.classList.add("ione4-video-player__thumbnail"),a.addEventListener("click",function(){var i=this;if(i.dataset.videoId&&t[n]._id!=i.dataset.videoId){var a=t.filter(function(e){return e._id===i.dataset.videoId});n=t.indexOf(a[0]),c(i.dataset.videoId,e.title,!0)}}),a.appendChild(s),o.appendChild(d),o.appendChild(r),o.classList.add("ione4-video-player__thumbnails-meta"),a.appendChild(o),i.appendChild(a)}),window.addEventListener("message",function(e){if(e)try{"zype:complete"===JSON.parse(e.data).event&&(n++,c(t[n]._id,t[n].title,!0))}catch(e){}},!1),c(t[n]._id,t[n].title)}}).catch(function(e){console.error(e)})}}function c(e,t,n){var o=s.closest(".player-wrapper").nextElementSibling;s.innerHTML=null;var r=document.createElement("div");r.id="zype_"+e,s.appendChild(r),o.innerText=t,i.querySelectorAll("li").forEach(function(t){t.dataset.videoId===e?t.classList.add("active"):t.classList.remove("active")});var c=new URLSearchParams({api_key:videoHubWidget.player_key,autoplay:n||!1,controls:!0,playlist_skin:"top_list_titles"});fetch("https://api.zype.com/videos/"+e+"/ad_timings?api_key="+videoHubWidget.player_key,{method:"GET",headers:{Accept:"application/json"}}).then(function(e){return e.json()}).then(function(t){var i=t.response,n=new Set;i.length>0&&i.forEach(function(e){e.ad_timings.forEach(function(e){0!==e.time&&n.add(e.hms_time)})}),window.zypeInitialize=function(e){a.has(e.src)||(a.add(e.src),e.muted=!0,d(0,{adBreaks:n}))};var o="https://player.zype.com/embed/"+e+".js?"+c.toString(),r=document.createElement("script");r.src=o,r.async=!0,s.appendChild(r)})}function d(e,t){function i(){return new URL(theoplayer.source.sources[0].src).pathname.split("/").pop().split(".")[0]}function n(e){var t={Test:ioneAdUtils.getEnvironment(),pg:"home"},n=[];for(var a in t)n.push(a+"%3D"+t[a].replace(",","%2C"));var s=new URL(e);return s.searchParams.set("vid",i()),s.searchParams.set("cust_params",n.join("%26")),s.toString()}window.willPlayAd=!0,videoHubWidget.ad_exclusions.indexOf(i())>-1||window.willPlayAd&&(window.willPlayAd=!1,window.theoplayer.ads.schedule({integration:"google-ima",sources:n(videoHubWidget.ad_tag),timeOffset:"0%"}),t.adBreaks.forEach(function(e){player.ads.schedule({integration:"google-ima",sources:{src:n(videoHubWidget.ad_tag_midroll),type:"vast"},timeOffset:e})}))}})})();

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.