| Index: webrequest.js |
| =================================================================== |
| --- a/webrequest.js |
| +++ b/webrequest.js |
| @@ -12,17 +12,17 @@ var frames = {}; |
| function onBeforeRequest(details) |
| { |
| if (details.tabId == -1) |
| return {}; |
| var type = details.type; |
| if (type == "main_frame" || type == "sub_frame") |
| - recordFrame(details.tabId, details.frameId, details.parentFrameId, details.url, type == "main_frame"); |
| + recordFrame(details.tabId, details.frameId, details.parentFrameId, details.url); |
| if (type == "main_frame") |
| return {}; |
| // Type names match Mozilla's with main_frame and sub_frame being the only exceptions. |
| if (type == "sub_frame") |
| type = "SUBDOCUMENT"; |
| else |
| @@ -56,17 +56,17 @@ function onBeforeSendHeaders(details) |
| { |
| headers.push({name: "DNT", value: "1"}); |
| return {requestHeaders: headers}; |
| } |
| } |
| return null; |
| } |
| -function recordFrame(tabId, frameId, parentFrameId, frameUrl, isMain) |
| +function recordFrame(tabId, frameId, parentFrameId, frameUrl) |
| { |
| if (!(tabId in frames)) |
| frames[tabId] = {}; |
| frames[tabId][frameId] = {url: frameUrl, parent: parentFrameId}; |
| } |
| function getFrameUrl(tabId, frameId) |
| { |