1
0
mirror of https://gitee.com/bitdance-team/chrome-extension synced 2025-10-08 00:45:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

url-jianshu-bugfixed

This commit is contained in:
simonzhangs
2022-02-06 14:40:55 +08:00
parent c57be03967
commit 45e93473b3

View File

@@ -86,13 +86,24 @@ window.onload = function(){
} }
} }
locHref = locHref.split(RedirectPage.sites[locHost].include); setTimeout(url(),200);
if(locHref){
location.replace(decodeURIComponent(locHref[1])); function url(){
}else{ let flag = false;
//改进 if(locHref.includes(RedirectPage.sites[locHost].include)){
let target = document.querySelector(RedirectPage.sites[locHost].selector); locHref = locHref.split(RedirectPage.sites[locHost].include);
location.replace(target.href || target.innerText) flag = true;
}
if(flag){
location.replace(decodeURIComponent(locHref[1]));
}else{
//改进
if(RedirectPage.sites[locHost].selector){
let target = document.querySelector(RedirectPage.sites[locHost].selector);
location.replace(target.href || target.innerText)
}
}
} }
//两种方案 默认不阻止重定向 阻止重定向直接跳转 //两种方案 默认不阻止重定向 阻止重定向直接跳转