I'm trying to use webRequest API to change the loaded .swf file on a webpage... The page loads a file called chat.swf, but i want to redirect to chat2.swf in the same directory in order to use the other file. I was told that this could work, but I have no idea how to use this API correctly and I cannot find any examples @_@
function incerceptChat(chat){
console.log( "onBeforeRequest", details );
if(chat.url == swf1){
chat = swf2;
}
}
that's my function that's supposed to change the URL, but I have been unable to get it to work (probably wrong syntax somewhere...) and I'm using this to listen:
chrome.experimental.webRequest.onBeforeRequrest.addListener(interceptChat, {"redirectUrl": chat});