javascript - In chrome extension content-scripts, how can I redirect the current window to a different url and still have the script continue -
i trying write extension goes through google voice inbox , gets phone numbers have ever contacted me. these numbers , them output them www.editpad.org. the issue if try redirect www.google.com/voice www.editpad.org, using window.location.href = "www.editpad.org" i have tried using background scripts like: //content script chrome.extension.sendrequest({redirect: "http://www.editpad.org"}); //background chrome.extension.onrequest.addlistener(function(request, sender, sendresponse) { chrome.tabs.update(sender.tab.id, {url: request.redirect}); sendresponse(); }); however, once redirects, seems script stops running (console.log doesn't work). believe it's because editpad.org not in manifest.json matching websites. if add matching websites, script redirect editpad.org, re-run , refresh on , over. how can redirect page editpad.org , still continue script left off say, "once you're on new page, start executing following function" m...