mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-25 17:15:09 +00:00
Update resource-parser.js
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2023-03-25 21:35⟧
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2023-03-26 15:05⟧
|
||||
----------------------------------------------------------
|
||||
🛠 发现 𝐁𝐔𝐆 请反馈: https://t.me/Shawn_Parser_Bot
|
||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||
@@ -2485,7 +2485,7 @@ function get_emoji(emojip, sname) {
|
||||
"🇬🇹": ["危地马拉", " GT "],
|
||||
"🇭🇰": ["HK", "Hongkong", "Hong Kong", "HongKong", "HONG KONG","香港", "深港", "沪港", "呼港", "HKT", "HKBN", "HGC", "WTT", "CMI", "穗港", "京港", "港"],
|
||||
"🇨🇳": ["CN", "China", "回国", "中国","中國", "江苏", "北京", "上海", "广州", "深圳", "杭州", "徐州", "青岛", "宁波", "镇江", "back"],
|
||||
"🇬🇺": [" 关岛"],
|
||||
"🇬🇺": ["关岛"],
|
||||
"🇱🇧": ["黎巴嫩","LB", "Lebanon"],
|
||||
"🇧🇳": ["文莱","BRN","Negara Brunei Darussalam"],
|
||||
"🌏": ["亚洲","Asia"]
|
||||
@@ -2764,7 +2764,7 @@ function YAMLFix(cnt){
|
||||
if(Pdbg == 1) {
|
||||
$notify("part-fix0:","","part-fix0:\nproxies:\n"+cnt.split("proxies:")[1])}
|
||||
// 2023-03-23 👇修正部分类型
|
||||
cnt = cnt.replace(/\n\s{2}([a-zA-Z]+.*\:)/g,"\n $1")
|
||||
cnt = cnt.replace(/\n\s{2}([a-zA-Z]+.*\:)/g,"\n $1").replace(/\n(\-.*)/g,"\n $1")
|
||||
if(Pdbg == 1) {
|
||||
$notify("part-fix1:","","part-fix1:\nproxies:\n"+cnt.split("proxies:")[1])}
|
||||
// cnt = cnt.indexOf("proxies:") == -1? "proxies:\n" + cnt :"proxies:"+cnt.split("proxies:")[1]
|
||||
@@ -2778,7 +2778,7 @@ function YAMLFix(cnt){
|
||||
//2022-09-01 remove host in s{6}(H|h)ost
|
||||
//cnt = cnt.indexOf("proxies:") != -1?cnt.replace(/\n\s{4}headers/g,"\n headers").replace(/\n\s{6}Host/g,"\n Host").replace(/\t/g,""):cnt
|
||||
//2022-11-29 修改
|
||||
cnt = cnt.indexOf("proxies:") != -1 && cnt.indexOf("\n\s{4}server")!=-1 ? cnt.replace(/\n\s{4}headers/g,"\n headers").replace(/\n\s{6}Host/g,"\n Host").replace(/\t/g,""):cnt
|
||||
cnt = cnt.indexOf("proxies:") != -1 && /\n\s{4}server/.test(cnt) ? cnt.replace(/\n\s{4}(headers|path)/g,"\n $1").replace(/\n\s{6}Host/g,"\n Host").replace(/\t/g,""):cnt
|
||||
//console.log("part-fix:\n"+cnt.split("proxies:")[1])
|
||||
cnt = cnt.indexOf("proxies:") == -1? "proxies:\n" + cnt :"proxies:"+cnt.split("proxies:")[1]
|
||||
console.log("after-fix\n"+cnt)
|
||||
|
||||
Reference in New Issue
Block a user