(()=>{const e=[];function t(){const t=document.querySelectorAll("div[mode]");t&&t.forEach(t=>{const o=t.querySelector("div[id^=xgwrapper-]");if(o){const t=o.id.split("-")[o.id.split("-").length-1];e.includes(t)||(e.push(t),function(e){const t={title:document.title,poster:"",bytSize:0,size:0,url:"",videoType:"mp4",isSelect:!1};chrome.runtime.sendMessage({tip:"makeXHRrequest",data:i(e)},e=>{if(e){const i=JSON.parse(e).aweme_list[0];t.url=i.video.play_addr.url_list[0],i.desc&&(t.title=i.desc.substr(0,30),t.fileName=t.title,t.superSpecialFileName=t.title),chrome.runtime.sendMessage({tip:"addAudioRowFromContent",row:t})}})}(t))}})}function i(e){const t=1180,i="trill",n="api-h2.tiktokv.com",r="v1",a="26.1.3",s="260103";let c=Math.round(Date.now()/1e3);const d={aweme_id:e,version_name:a,version_code:s,build_number:a,manifest_version_code:s,update_version_code:s,openudid:o("0123456789abcdef",16),uuid:o("0123456789",16),_rticket:1e3*c,ts:c,device_brand:"Google",device_type:"Pixel 4",device_platform:"android",resolution:"1080*1920",dpi:420,os_version:"10",os_api:"29",carrier_region:"US",sys_region:"US",region:"US",app_name:i,app_language:"en",language:"en",timezone_name:"America/New_York",timezone_offset:"-14400",channel:"googleplay",ac:"wifi",mcc_mnc:"310260",is_my_cn:0,aid:t,ssmix:"a",as:"a1qwert123",cp:"cbfhckdckkde1"};return`https://${n}/aweme/${r}/feed/`+Object.keys(d).map((e,t)=>`${t>0?"&":"?"}${e}=${d[e]}`).join("")}function o(e,t=16){let i="",o=e.length;for(let n=0;n<t;n++)i+=e.charAt(Math.floor(Math.random()*o));return i}setInterval(()=>{t()},1e3)})();