PageSourceSearch

https://ksqd.org/wp-content/plugins/apmap/source/js/hadmanager.js?ver=7.1.2

js ksqd.org collected 2026-09-24 09:28:45 UTC 3,394 bytes, 7 lines download raw bytes

1(function(H,h){H.HAPAdManager=function(t,r,I,J,c,K,L,M){function x(){c.removeEventListener("loadedmetadata",x,!1);h(m).trigger("HAPAdManager.ADPRE_PLAY");d=c;d.addEventListener("timeupdate",l,!1);l()}function y(){e++;if(e<f.adPre.length){d.src=f.adPre[e];var b=d.play();void 0!==b&&b.then(function(){})["catch"](function(k){})}else d.removeEventListener("timeupdate",l,!1),c.removeEventListener("ended",y,!1),n=!1,e=0,h(m).trigger("HAPAdManager.ADPRE_ENDED")}function D(){v&&!E?E=!0:(z&&(h(m).trigger("HAPAdManager.ADMID_PLAY"),
2d=a,d.addEventListener("timeupdate",l,!1)),p=!0,a.volume=A,h(r).trigger("adMidPlay",{instance:r,instanceName:t.instanceName,media:f.adMid}))}function F(){v&&!w?w=!0:(z&&(d.removeEventListener("timeupdate",l,!1),h(m).trigger("HAPAdManager.ADMID_ENDED")),p=!1,h(r).trigger("adMidEnded",{instance:r,instanceName:t.instanceName,media:f.adMid}),u())}function u(){g&&clearTimeout(g);g=setTimeout(function(){g=null;r.getMediaPlaying()&&(e++,e>f.adMid.length-1&&(e=0),a.src=f.adMid[e],a.play())},parseInt(f.adMidInterval||
31E4,10)+t.dataInterval)}function B(){c.removeEventListener("loadedmetadata",B,!1);h(m).trigger("HAPAdManager.ADEND_PLAY");d=c;d.addEventListener("timeupdate",l,!1)}function C(){e++;if(e<f.adEnd.length){d.src=f.adEnd[e];var b=d.play();void 0!==b&&b.then(function(){})["catch"](function(k){})}else d.removeEventListener("timeupdate",l,!1),d.removeEventListener("ended",C,!1),q=!1,h(m).trigger("HAPAdManager.ADEND_ENDED")}function l(){if(n||q)var b=c.currentTime,k=c.duration;else p&&(b=a.currentTime,k=a.duration);
4HAPUtils.isNumber(b)&&HAPUtils.isNumber(k)&&(K.width(b/k*G),b=parseInt(k-b,10),L.find("span").html(HAPUtils.formatTime(b)))}var m=this,v=navigator.userAgent.match(/(iPad|iPhone|iPod)/g),z=t.pauseAudioDuringAds,d,n,a,g,p,E,w,q,e=0,f=I,A=J,G=M;h(r).on("volumeChange",function(b,k){A=k.volume;a&&(a.volume=A)});this.initAdPre=function(){n=!0;c.addEventListener("loadedmetadata",x,!1);c.addEventListener("ended",y,!1);c.src=f.adPre[e]};this.forceAdMidAudio=function(){h(m).trigger("HAPAdManager.IOS_ADMID_FIX_START",
5!0);a||(a=document.createElement("audio"),a.addEventListener("play",D,!1),a.addEventListener("ended",F,!1));a.src=t.sourcePath+"data/silence.mp3";a.play()};this.adMidStartHandler=function(){a||(a=document.createElement("audio"),a.addEventListener("play",D,!1),a.addEventListener("ended",F,!1));v?w&&u():u()};this.adMidPlayHandler=function(){g||(v?w&&u():u())};this.clearAdMidTimeout=function(){g&&(clearTimeout(g),g=null)};this.toggleAdMidAudio=function(){if(a&&z)if(a.paused){var b=a.play();void 0!==
6b&&b.then(function(){})["catch"](function(k){})}else a.pause()};this.setAdEnd=function(){q=!0;e=0;c.addEventListener("loadedmetadata",B,!1);c.addEventListener("ended",C,!1);c.src=f.adEnd[e];var b=c.play();void 0!==b&&b.then(function(){})["catch"](function(k){})};this.isAdOn=function(){return n||p||q};this.isAdPreOn=function(){return n};this.isAdMidOn=function(){return p};this.isAdEndOn=function(){return q};this.setAdData=function(b){f=b;e=0};this.setSeekBarSize=function(b){G=b};this.cleanAds=function(){d&&
7d.removeEventListener("timeupdate",l,!1);n&&(c.removeEventListener("loadedmetadata",x,!1),c.removeEventListener("ended",y,!1),n=!1);g&&(clearTimeout(g),g=null);p&&(a&&(a.pause(),a.src=""),p=!1);q&&(c.removeEventListener("loadedmetadata",B,!1),c.removeEventListener("ended",C,!1),q=!1)}}})(window,jQuery);

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.