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