mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Update clean params (#1207)
This commit is contained in:
parent
61ed09d383
commit
a448e8d832
2
min/url-params-clean.min.js
vendored
2
min/url-params-clean.min.js
vendored
@ -1 +1 @@
|
|||||||
(()=>(t,e)=>{const o=["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","p2p_type","referfrom"];const r=[{match:/\/\/www\.bilibili\.com\/audio\/(au[\d]+|mycollection)/,param:"type"}];const s=[/game\.bilibili\.com\/fgo/];const a=t=>t;const c=["videocard_series"];const i=()=>{const t=location.search.substring(1).split("&");if(t.some((t=>c.some((e=>t.includes(e)))))){return}const e=t.filter((t=>{if(o.some((e=>t.startsWith(`${e}=`)))){return false}if(r.some((({match:e,param:o})=>document.URL.match(e)&&t.startsWith(`${o}=`)))){return false}return true}));const s=e.join("&");const i=a(document.URL.replace(location.search,""));const n=s?"?"+s:"";const m=i+n;if(m!==document.URL){console.log("[URL params clean]",document.URL,m);history.replaceState({},document.title,m)}};fullyLoaded((()=>{if(document.contentType==="text/html"){i();Observer.videoChange((()=>i()))}}))})();
|
(()=>(t,e)=>{const o=["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","p2p_type","referfrom","visit_id"];const s=[{match:/\/\/www\.bilibili\.com\/audio\/(au[\d]+|mycollection)/,param:"type"},{match:/\/\/live\.bilibili\.com\//,param:"session_id"}];const r=[/game\.bilibili\.com\/fgo/];const i=t=>t;const a=["videocard_series"];const c=()=>{const t=location.search.substring(1).split("&");if(t.some((t=>a.some((e=>t.includes(e)))))){return}const e=t.filter((t=>{if(o.some((e=>t.startsWith(`${e}=`)))){return false}if(s.some((({match:e,param:o})=>document.URL.match(e)&&t.startsWith(`${o}=`)))){return false}return true}));const r=e.join("&");const c=i(document.URL.replace(location.search,""));const n=r?"?"+r:"";const m=c+n;if(m!==document.URL){console.log("[URL params clean]",document.URL,m);history.replaceState({},document.title,m)}};fullyLoaded((()=>{if(document.contentType==="text/html"){c();Observer.videoChange((()=>c()))}}))})();
|
||||||
@ -26,11 +26,16 @@ const blockParams = [
|
|||||||
'platform_network_status',
|
'platform_network_status',
|
||||||
'p2p_type',
|
'p2p_type',
|
||||||
'referfrom',
|
'referfrom',
|
||||||
|
'visit_id',
|
||||||
]
|
]
|
||||||
const siteSpecifiedParams = [
|
const siteSpecifiedParams = [
|
||||||
{
|
{
|
||||||
match: /\/\/www\.bilibili\.com\/audio\/(au[\d]+|mycollection)/,
|
match: /\/\/www\.bilibili\.com\/audio\/(au[\d]+|mycollection)/,
|
||||||
param: 'type',
|
param: 'type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: /\/\/live\.bilibili\.com\//,
|
||||||
|
param: 'session_id',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const noNormalizes = [
|
const noNormalizes = [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user