mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
581 B
JavaScript
1 line
581 B
JavaScript
(()=>{return(t,e)=>{const s=["spm_id_from","from_source","from","seid","share_source","share_medium","bbid","ts","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 i=n+c;if(i!==document.URL){console.log("[URL params clean]",document.URL,i);history.replaceState({},document.title,i)}};r();Observer.videoChange(()=>r())}})(); |