MCPcopy Create free account
hub / github.com/FastForwardTeam/FastForward / resolveRedirect

Function resolveRedirect

src/js/background.js:558–577  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

556
557// Preflight Bypasses including Tracker Bypass using Apimon.de
558function resolveRedirect(url)
559{
560 let xhr=new XMLHttpRequest(),destination
561 xhr.onload=()=>{
562 let json=JSON.parse(xhr.responseText)
563 if(json&&json.destination)
564 {
565 destination=json.destination
566 preflightRules.tracker_force_http.forEach(domain=>{
567 if(destination.substr(0,9+domain.length)=="https://"+domain+"/")
568 {
569 destination="http://"+domain+"/"+destination.substr(9+domain.length)
570 }
571 })
572 }
573 }
574 xhr.open("GET","https://apimon.de/redirect/"+encodeURIComponent(url),false)
575 xhr.send()
576 return destination
577}
578function decodeHexString(hexstr)
579{
580 let a=[]

Callers 1

background.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected