Open diegito opened 10 years ago
Cause of this is the asynchronous behaviour of getSelected and onBeforeSendHeaders.addListener(), see http://stackoverflow.com/questions/24538439/chrome-extensions-webrequest-filtering-by-tabid-not-working.
I can imagine an instance where a user will load sites in two different tabs and would want to create WARCs from each tab (e.g., archiving all sections of a website). The issue here is all tabs' queried are being lumped together. The solution might be to have some associate array -like (because JS only has Objs) structure to attribute data from each tab to its respective tab and, on pressing the Generate WARC button, reference the array as a basis for what to write.
Related #7
When getting the warc file from one tab, when I edit it I see that also other headers from other opened tabs I have are inserted. Perhaps the filtering inside
code.js
forchrome.webRequest.onBeforeSendHeaders
andchrome.webRequest.onHeadersReceived
does not work?