Universal-Bypass/html/before-navigate.js
Tim Speckhals b1ecf6744d
8.0
2018-12-30 13:20:23 +01:00

17 lines
459 B
JavaScript

let params=new URLSearchParams(location.search)
if(params.has("target"))
{
brws.storage.sync.get(["instant_navigation"],res=>{
if(res&&res.instant_navigation&&res.instant_navigation==="true")
location.href=params.get("target")
})
let i=document.querySelector('[data-message="beforeNavigateDestination"]')
i.innerHTML=i.innerHTML.replace("%",'<a></a>')
let a=i.querySelector("a")
a.href=a.textContent=params.get("target")
}
else
{
history.back()
}