Index: ext/background.js |
=================================================================== |
--- a/ext/background.js |
+++ b/ext/background.js |
@@ -608,41 +608,13 @@ |
if (type == "sub_frame") |
frameId = details.parentFrameId; |
- let frame2 = null; |
- if (details.frameAncestors) { |
- for (let i = details.frameAncestors.length - 1; i >= 0; i--) { |
- frame2 = {id: details.frameAncestors[i].frameId, |
- url: new URL(details.frameAncestors[i].url), |
- parent: frame2}; |
- } |
- |
- // the url here is not correct I think. |
- if (type != "sub_frame") |
- frame2 = {url: new URL(details.documentUrl), parent: frame2}; |
- } |
- |
// Sometimes requests are not associated with a browser tab and |
// in this case we want to still be able to view the url being called. |
+ let frame = null; |
let page = null; |
- let frame = null; |
if (details.tabId != -1) |
{ |
- // Only Firefox supports frameAncestors, so we have to keep the list |
- // of frames ourself. |
- if (!frame) |
- frame = ext.getFrame(details.tabId, frameId); |
- |
- |
- let s = (f, a = []) => { |
- a.push(f.url.toString()); |
- if (f.parent) |
- return s(f.parent, a) |
- return a; |
- } |
- |
- if (s(frame).length > 0) |
- console.log(url.toString(), s(frame), s(frame2)) |
- |
+ frame = ext.getFrame(details.tabId, frameId); |
page = new Page({id: details.tabId}); |
} |