Add linkpoi.in bypass (closes #551)
This commit is contained in:
parent
1680f42885
commit
6324092f42
@ -543,6 +543,20 @@ brws.webRequest.onBeforeRequest.addListener(details=>{
|
||||
}
|
||||
},{types:["main_frame"],urls:["*://*.gslink.co/e/*/s/*"]},["blocking"])
|
||||
|
||||
brws.webRequest.onBeforeRequest.addListener(details=>{
|
||||
if(enabled)
|
||||
{
|
||||
let xhr=new XMLHttpRequest(details.url+"/i"),destination
|
||||
xhr.onload=()=>destination=new URL(xhr.responseURL).searchParams.get("url")
|
||||
xhr.open("GET",details.url+"/i",false)
|
||||
xhr.send()
|
||||
if(destination)
|
||||
{
|
||||
return getRedirect(destination)
|
||||
}
|
||||
}
|
||||
},{types:["main_frame"],urls:["*://*.linkpoi.in/*"]},["blocking"])
|
||||
|
||||
brws.webRequest.onBeforeRequest.addListener(details=>{
|
||||
if(enabled)
|
||||
{
|
||||
@ -870,7 +884,9 @@ function resolveRedirect(url)
|
||||
xhr.onload=()=>{
|
||||
let json=JSON.parse(xhr.responseText)
|
||||
if(json&&json.destination)
|
||||
{
|
||||
destination=json.destination
|
||||
}
|
||||
}
|
||||
xhr.open("GET","https://apimon.de/redirect/"+encodeURIComponent(url),false)
|
||||
xhr.send()
|
||||
|
Loading…
x
Reference in New Issue
Block a user