mirror of
https://gitee.com/bitdance-team/chrome-extension
synced 2025-10-08 00:45:13 +08:00
url-jianshu-bugfixed
This commit is contained in:
@@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//两种方案 默认不阻止重定向 阻止重定向直接跳转
|
//两种方案 默认不阻止重定向 阻止重定向直接跳转
|
||||||
|
Reference in New Issue
Block a user