v-fixed43: 回滚IPv6选择页/切换按钮(体验不佳,恢复自动跳转)

This commit is contained in:
jinghui committed 2026-11-02 01:06:04 +08:00
1 parent 7a945dda72
commit 06a174d4bc
1 file changed
+1 -1
+1 -1
View File
@@ -223,7 +223,7 @@ function writeChecked(p, s) {
// 清理旧版探针(V1 自动跳转 / V2 旧版)
s = s.replace(/\/\*V6-PROBE-V[12]\*\/.*?catch\(e\)\{\}\s*/s, "");
if (s.includes("/*V6-PROBE-V1*/")) { log("v6-probe: skip (already)"); return; }
const probe = '/*V6-PROBE-V1*/try{if("tv.88531.cn"===location.hostname){var H={v4:"https://tv.88531.cn",v6:"https://tv6.88531.cn"};function showSel(){var m=document.createElement("div");m.id="__v6m";m.style.cssText="position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6)";var c=document.createElement("div");c.style.cssText="background:#1e1e2e;color:#fff;padding:24px;border-radius:12px;max-width:360px;text-align:center;font-family:sans-serif";var h=document.createElement("h3");h.textContent="选择访问线路";h.style.margin="0 0 12px";c.appendChild(h);var p=document.createElement("p");p.textContent="IPv4 / IPv6 自由切换";p.style.cssText="opacity:.7;font-size:13px;margin:0 0 16px";c.appendChild(p);var row=document.createElement("div");row.style.cssText="display:flex;gap:10px;justify-content:center";function btn(txt,col,host){var b=document.createElement("button");b.textContent=txt;b.style.cssText="padding:8px 18px;border:none;border-radius:8px;background:"+col+";color:#fff;cursor:pointer";b.onclick=function(){localStorage.setItem("__v6dest",host===H.v4?"v4":"v6");location.replace(host+location.pathname+location.search+location.hash)};row.appendChild(b)}btn("IPv4","#3b82f6",H.v4);btn("IPv6","#10b981",H.v6);c.appendChild(row);m.appendChild(c);document.body.appendChild(m)}function addToggle(){var b=document.createElement("button");b.textContent="🌐 IPV4/IPV6";b.style.cssText="position:fixed;top:10px;right:120px;z-index:99998;padding:8px 14px;border:1px solid rgba(255,255,255,.25);border-radius:8px;background:rgba(0,0,0,.55);color:#fff;font-size:13px;font-weight:600;cursor:pointer;backdrop-filter:blur(6px)";b.onclick=function(){var c=localStorage.getItem("__v6dest")||"v4";localStorage.setItem("__v6dest",c==="v4"?"v6":"v4");location.replace((c==="v4"?H.v6:H.v4)+location.pathname+location.search+location.hash)};document.body.appendChild(b)}if(!localStorage.getItem("__v6dest")){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",showSel)}else{showSel()}}else{if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",addToggle)}else{addToggle()}}}}catch(e){} ';
const probe = '/*V6-PROBE-V1*/try{if("tv.88531.cn"===location.hostname){var __v6k="__v6dest";var __v6t=+(localStorage.getItem(__v6k+"_t")||0);if(Date.now()-__v6t>21600000){localStorage.setItem(__v6k+"_t",Date.now());var __v6c=new AbortController();var __v6ti=setTimeout(function(){__v6c.abort()},1500);fetch("https://tv6.88531.cn/api/license-config",{mode:"no-cors",signal:__v6c.signal,cache:"no-store"}).then(function(){clearTimeout(__v6ti);location.replace("https://tv6.88531.cn"+location.pathname+location.search+location.hash)}).catch(function(){clearTimeout(__v6ti)})}}}catch(e){} ';
writeChecked(target, probe + s);
log("v6-probe: injected into", target);
})();