using chrome.webRequest.onCompleted.addListener as shown in this gist https://gist.github.com/DinisCruz/f9a3a3a0ffae8285c530#file-93-hook-web-requests-js