Bilibili-Evolved/min/url-params-clean.min.js
2019-12-27 18:12:16 +08:00

1 line
477 B
JavaScript

(()=>{return(e,t)=>{const o=["spm_id_from","from_source","from","seid","share_source","share_medium"];const r=()=>{const e=location.search.substring(1).split("&");const t=e.filter(e=>{if(o.some(t=>e.startsWith(`${t}=`))){return false}return true});if(e.length!==t.length){const e=t.join("&");const o=document.URL.replace(location.search,e?"?"+e:"");console.log("[URL params clean]",document.URL,o);history.replaceState({},document.title,o)}};Observer.videoChange(()=>r())}})();