mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
844 B
JavaScript
1 line
844 B
JavaScript
(()=>{return(t,e)=>{const r=["spm_id_from","from_source","from_spmid","from","seid","share_source","share_medium","share_plat","share_tag","bbid","ts","timestamp","unique_k","rt","tdsourcetag","accept_quality","broadcast_type","current_qn","current_quality","playurl_h264","playurl_h265","quality_description","network","network_status","platform_network_status"];const o=[/game\.bilibili\.com\/fgo/];const s=t=>{return t};const a=()=>{const t=location.search.substring(1).split("&");const e=t.filter(t=>{if(r.some(e=>t.startsWith(`${e}=`))){return false}return true});const o=e.join("&");const a=s(document.URL.replace(location.search,""));const n=o?"?"+o:"";const c=a+n;if(c!==document.URL){console.log("[URL params clean]",document.URL,c);history.replaceState({},document.title,c)}};fullyLoaded(()=>{a();Observer.videoChange(()=>a())})}})(); |