Created
July 21, 2015 01:16
-
-
Save MeoMix/242bb5676b2246e564c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Append a script to the page which will intercept YouTube's server requests and post messages out of the iframe with details about those requests. | |
// Needs to be an injected script because content scripts are sandboxed in such a way that they do not share variables with appended scripts. | |
this.injectInterceptorScript = function() { | |
var interceptorScript = document.createElement('script'); | |
interceptorScript.src = chrome.runtime.getURL('js/inject/interceptor.js'); | |
document.head.appendChild(interceptorScript); | |
}.bind(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment