PageSourceSearch

https://musoplayer.com/public/lib/performance-sdk.js?v=1

js musoplayer.com collected 2026-09-24 13:59:31 UTC 12,171 bytes, 1 lines download raw bytes

1function randomString(len){len=len||10;for(var $chars="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz123456789",maxPos=$chars.length,pwd="",i=0;i<len;i++)pwd+=$chars.charAt(Math.floor(Math.random()*maxPos));return pwd+(new Date).getTime()}function Performance(option,fn){try{var opt={domain:"http://localhost/api",outtime:300,filterUrl:[],isPage:!0,isAjax:!0,isResource:!0,isError:!0,add:{}},conf=((opt=Object.assign(opt,option)).filterUrl=opt.filterUrl.concat(["/api/v1/report/web","livereload.js?snipver=1","/sockjs-node/"]),{resourceList:[],performance:{},errorList:[],fetchNum:0,loadNum:0,ajaxLength:0,fetLength:0,ajaxMsg:{},goingType:"",haveAjax:!1,haveFetch:!1,preUrl:document.referrer&&document.referrer!==location.href?document.referrer:"",page:""}),errordefo={t:"",n:"js",msg:"",data:{}},beginTime=(new Date).getTime(),loadTime=0,ajaxTime=0,fetchTime=0;function reportData(type){type=type||1,setTimeout(function(){opt.isPage&&window.performance&&(timing=performance.timing,conf.performance={dnst:timing.domainLookupEnd-timing.domainLookupStart||0,tcpt:timing.connectEnd-timing.connectStart||0,wit:timing.responseStart-timing.navigationStart||0,domt:timing.domContentLoadedEventEnd-timing.navigationStart||0,lodt:timing.loadEventEnd-timing.navigationStart||0,radt:timing.fetchStart-timing.navigationStart||0,rdit:timing.redirectEnd-timing.redirectStart||0,uodt:timing.unloadEventEnd-timing.unloadEventStart||0,reqt:timing.responseEnd-timing.requestStart||0,andt:timing.domComplete-timing.domInteractive||0}),!opt.isResource&&!opt.isAjax||window.performance&&window.performance.getEntries&&(timing=performance.getEntriesByType("resource"),resourceList=[],(timing||timing.length)&&(timing.forEach(function(item){var json;(opt.isAjax||"xmlhttprequest"!=item.initiatorType&&"fetchrequest"!=item.initiatorType)&&(!opt.isResource&&"xmlhttprequest"!=item.initiatorType&&"fetchrequest"!==item.initiatorType||(json={name:item.name,method:"GET",type:item.initiatorType,duration:item.duration.toFixed(2)||0,decodedBodySize:item.decodedBodySize||0,nextHopProtocol:item.nextHopProtocol},item=item.name?item.name.split("?")[0]:"",(item=conf.ajaxMsg[item]||"")&&(json.method=item.method||"GET",json.type=item.type||json.type,json.decodedBodySize=json.decodedBodySize||item.decodedBodySize),resourceList.push(json)))}),conf.resourceList=resourceList)),ERRORLIST&&ERRORLIST.length&&(conf.errorList=conf.errorList.concat(ERRORLIST));var timing,resourceList,w=document.documentElement.clientWidth||document.body.clientWidth,h=document.documentElement.clientHeight||document.body.clientHeight,markuser=function(){var markUser=sessionStorage.getItem("ps_markUser")||"",result={markUser:markUser,isFristIn:!1};return markUser||(markUser=randomString(),sessionStorage.setItem("ps_markUser",markUser),result.markUser=markUser,result.isFristIn=!0),result}(),result={time:(new Date).getTime(),addData:ADDDATA,markUser:markuser.markUser,markUv:function(){var date=new Date,markUv=localStorage&&localStorage.getItem("ps_markUv")||"",datatime=localStorage&&localStorage.getItem("ps_markUvTime")||"",today=date.getFullYear()+"/"+(date.getMonth()+1)+"/"+date.getDate()+" 23:59:59";return(!markUv&&!datatime||date.getTime()>+datatime)&&(markUv=randomString(),localStorage&&localStorage.setItem("ps_markUv",markUv),localStorage&&localStorage.setItem("ps_markUvTime",new Date(today).getTime())),markUv}(),type:type,url:location.href},reslist=conf.resourceList,filterUrl=opt.filterUrl,newlist=[];if(reslist&&reslist.length&&filterUrl&&filterUrl.length)for(var i=0;i<reslist.length;i++){for(var begin=!1,j=0;j<filterUrl.length;j++)if(-1<reslist[i].name.indexOf(filterUrl[j])){begin=!0;break}begin||newlist.push(reslist[i])}if(conf.resourceList=newlist,1===type){if(20<Math.floor(100*Math.random()))return;result=Object.assign(result,{preUrl:conf.preUrl,errorList:conf.errorList,performance:conf.performance,resourceList:conf.resourceList,isFristIn:markuser.isFristIn,screenwidth:w,screenheight:h})}else 2===type?result=Object.assign(result,{resourceList:conf.resourceList,errorList:conf.errorList}):3===type&&(result=Object.assign(result,{errorList:conf.errorList,resourceList:conf.resourceList}));result=Object.assign(result,opt.add),fn&&fn(result),!fn&&window.fetch&&fetch(opt.domain,{method:"POST",headers:{"Content-Type":"application/json"},type:"report-data",body:JSON.stringify(result)}),Promise.resolve().then(function(){clear()})},opt.outtime)}
1function getLargeTime(){conf.page!==location.href?(conf.haveAjax&&conf.haveFetch&&loadTime&&ajaxTime&&fetchTime||conf.haveAjax&&!conf.haveFetch&&loadTime&&ajaxTime||!conf.haveAjax&&conf.haveFetch&&loadTime&&fetchTime||!conf.haveAjax&&!conf.haveFetch&&loadTime||loadTime)&&reportData(1):(conf.haveAjax&&conf.haveFetch&&ajaxTime&&fetchTime||conf.haveAjax&&!conf.haveFetch&&ajaxTime||!conf.haveAjax&&conf.haveFetch&&fetchTime)&&reportData(2)}function ajaxResponse(xhr){var defaults=Object.assign({},errordefo);defaults.t=(new Date).getTime(),defaults.n="ajax",defaults.msg=xhr.statusText||"ajax request error",defaults.method=xhr.method,defaults.data={resourceUrl:xhr.responseURL,text:xhr.statusText,status:xhr.status},conf.errorList.push(defaults)}function getFetchTime(){conf.fetchNum+=1,conf.fetLength===conf.fetchNum&&(conf.fetchNum=conf.fetLength=0,fetchTime=(new Date).getTime()-beginTime,getLargeTime())}function getAjaxTime(){conf.loadNum+=1,conf.loadNum===conf.ajaxLength&&(conf.ajaxLength=conf.loadNum=0,ajaxTime=(new Date).getTime()-beginTime,getLargeTime())}function clearPerformance(){window.performance&&window.performance.clearResourceTimings&&(conf.haveAjax&&conf.haveFetch&&0==conf.ajaxLength&&0==conf.fetLength||!conf.haveAjax&&conf.haveFetch&&0==conf.fetLength||conf.haveAjax&&!conf.haveFetch&&0==conf.ajaxLength)&&clear(1)}function clear(type){type=type||0,window.performance&&window.performance.clearResourceTimings&&performance.clearResourceTimings(),conf.performance={},conf.errorList=[],conf.preUrl="",conf.resourceList=[],conf.page=0===type?location.href:"",conf.haveAjax=!1,conf.haveFetch=!1,conf.ajaxMsg={},ERRORLIST=[],ADDDATA={},fetchTime=ajaxTime=0}opt.isError&&(window.addEventListener("error",function(e){var defaults=Object.assign({},errordefo);defaults.n="resource",defaults.t=(new Date).getTime(),defaults.msg=e.target.localName+" is load error",defaults.method="GET",defaults.data={target:e.target.localName,type:e.type,resourceUrl:e.target.href||e.target.currentSrc},e.target!=window&&conf.errorList.push(defaults)},!0),window.onerror=function(msg,_url,line,col,error){var defaults=Object.assign({},errordefo);setTimeout(function(){col=col||window.event&&window.event.errorCharacter||0,defaults.msg=error&&error.stack?error.stack.toString():msg,defaults.method="GET",defaults.data={resourceUrl:_url,line:line,col:col},defaults.t=(new Date).getTime(),conf.errorList.push(defaults),conf.page!==location.href||conf.haveAjax||reportData(3)},0)},window.addEventListener("unhandledrejection",function(e){var resourceUrl,line,defaults,e=e&&e.reason,message=e?e.message:"",e=(e?e.stack:"").match(/\(.+?\)/);(e=e&&e.length?e[0]:e)&&((e=(e=e.replace(/\w.+[js|html]/g,function($1){return resourceUrl=$1,""})).split(":"))&&1<e.length&&(line=parseInt(e[1]||0)),e=parseInt(e[2]||0),(defaults=Object.assign({},errordefo)).msg=message,defaults.method="GET",defaults.t=(new Date).getTime(),defaults.data={resourceUrl:resourceUrl,line:e,col:line},conf.errorList.push(defaults),conf.page!==location.href||conf.haveAjax||reportData(3))}),oldError=console.error,console.error=function(e){var defaults=Object.assign({},errordefo);return setTimeout(function(){defaults.msg=e,defaults.method="GET",defaults.t=(new Date).getTime(),defaults.data={resourceUrl:location.href},conf.errorList.push(defaults),conf.page!==location.href||conf.haveAjax||reportData(3)},0),oldError.apply(console,arguments)}),addEventListener("load",function(){loadTime=(new Date).getTime()-beginTime,getLargeTime()},!1),(opt.isAjax||opt.isError)&&function(){var _fetch;window.fetch&&(_fetch=fetch,window.fetch=function(){var url,result=function(arg){var result={method:"GET",type:"fetchrequest"},arg=Array.prototype.slice.apply(arg);if(!arg||!arg.length)return result;try{1===arg.length?"string"==typeof arg[0]?result.url=arg[0]:"object"==typeof arg[0]&&(result.url=arg[0].url,result.method=arg[0].method):(result.url=arg[0],result.method=arg[1].method||"GET",result.type=arg[1].type||"fetchrequest")}catch(err){}return result}(arguments);return"report-data"!==result.type&&(clearPerformance(),url=result.url?result.url.split("?")[0]:"",conf.ajaxMsg[url]=result,conf.fetLength=conf.fetLength+1,conf.haveFetch=!0),_fetch.apply(this,arguments).then(function(res){if("report-data"===result.type)return res;try{var url=res.url?res.url.split("?")[0]:"";res.clone().text().then(function(data){conf.ajaxMsg[url]&&(conf.ajaxMsg[url].decodedBodySize=data.length)})}catch(e){}return getFetchTime(),res}).catch(function(err){var defaults;if("report-data"!==result.type)return getFetchTime(),defaults=Object.assign({},errordefo),defaults.t=(new Date).getTime(),defaults.n="fetch",defaults.msg="fetch request error",defaults.method=result.method,defaults.data={resourceUrl:result.url,text:err.stack||err,status:0},conf.errorList.push(defaults),err})})}(),(opt.isAjax||opt.isError)&&(proxy={onreadystatechange:function(xhr){4===xhr.readyState&&setTimeout(function(){if("load"
1!==conf.goingType){conf.goingType="readychange";var responseURL=xhr.xhr.responseURL?xhr.xhr.responseURL.split("?")[0]:"";if(conf.ajaxMsg[responseURL]){try{xhr.xhr.response instanceof Blob?conf.ajaxMsg[responseURL].decodedBodySize=xhr.xhr.response.size:conf.ajaxMsg[responseURL].decodedBodySize=xhr.xhr.responseText.length}catch(err){}getAjaxTime()}(xhr.status<200||300<xhr.status)&&(xhr.method=xhr.args.method,ajaxResponse(xhr))}},600)},onerror:function(xhr){xhr.args&&(xhr.method=xhr.args.method,xhr.responseURL=xhr.args.url,xhr.statusText="ajax request error",conf.ajaxMsg[xhr.responseURL]&&getAjaxTime()),ajaxResponse(xhr)},onload:function(xhr){if(4===xhr.readyState&&"readychange"!==conf.goingType){conf.goingType="load";var responseURL=xhr.xhr.responseURL?xhr.xhr.responseURL.split("?")[0]:"";if(conf.ajaxMsg[responseURL]){try{xhr.xhr.response instanceof Blob?conf.ajaxMsg[responseURL].decodedBodySize=xhr.xhr.response.size:conf.ajaxMsg[responseURL].decodedBodySize=xhr.xhr.responseText.length}catch(err){}getAjaxTime()}(xhr.status<200||300<xhr.status)&&(xhr.method=xhr.args.method,ajaxResponse(xhr))}},open:function(arg,xhr){if(opt.filterUrl&&opt.filterUrl.length){var begin=!1;if(opt.filterUrl.forEach(function(item){-1!=arg[1].indexOf(item)&&(begin=!0)}),begin)return}var result={url:arg[1].split("?")[0],method:arg[0]||"GET",type:"xmlhttprequest"};this.args=result,clearPerformance(),conf.ajaxMsg[result.url]=result,conf.ajaxLength=conf.ajaxLength+1,conf.haveAjax=!0}},window._ahrealxhr=window._ahrealxhr||XMLHttpRequest,XMLHttpRequest=function(){for(var attr in this.xhr=new window._ahrealxhr,this.xhr){var type="";try{type=typeof this.xhr[attr]}catch(e){}"function"===type?this[attr]=function(fun){return function(){var args=[].slice.call(arguments);if(!proxy[fun]||!proxy[fun].call(this,args,this.xhr))return this.xhr[fun].apply(this.xhr,args)}}(attr):Object.defineProperty(this,attr,{get:function(attr){return function(){var v=this.hasOwnProperty(attr+"_")?this[attr+"_"]:this.xhr[attr],attrGetterHook=(proxy[attr]||{}).getter;return attrGetterHook&&attrGetterHook(v,this)||v}}(attr),set:function(attr){return function(v){var xhr=this.xhr,that=this,hook=proxy[attr];if("function"==typeof hook)xhr[attr]=function(){proxy[attr](that)||v.apply(xhr,arguments)};else{hook=(hook||{}).setter;v=hook&&hook(v,that)||v;try{xhr[attr]=v}catch(e){this[attr+"_"]=v}}}}(attr)})}},window._ahrealxhr)}catch(err){}var proxy,oldError}"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=Performance:window.Performance=Performance,window.ERRORLIST=[],window.ADDDATA={},Performance.addError=function(err){err={method:"GET",msg:err.msg,n:"js",data:{col:err.col,line:err.line,resourceUrl:err.resourceUrl}},ERRORLIST.push(err)},Performance.addData=function(fn){fn&&fn(ADDDATA)};

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.