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