0

That page has an EntryTool object that can only be obtained from that page.

Image

I can get the EntryTool object from the console. And I approached as follows to get the object in background.js.

// because it doesn't load right away
setInterval(() => {
    if (EntryTool) console.log(EntryTool);
    else console.log('none');
}, 1000);

And it kept outputting 'none'. I also used 'window.EntryTool' or 'document.defaultView.EntryTool' instead of 'EntryTool'(Both worked fine on console)

Still didn't work and I tried console the window.

console.log in console

console.log in background.js

The window object of the chrome extension and the window object obtained from the console are different.

how can i get it?

The manifest version is 3 and no API was used in the chrome extension.

Hopefully I can get it in some way I don't know.

  • https://i.stack.imgur.com/NQsOF.png I am guessing the extension is sent via an iframe (or some other means that is outside of your document). This means it will be harder to access due to Cross Scripting restriction: Screenshot from jsfiddle which has multiple iframes: https://i.imgur.com/uNV0PwL.png Not sure if this is what you need: https://stackoverflow.com/a/7597826/1238244 – lharby Aug 06 '23 at 10:54
  • Yes. It's probably an iframe. Is it impossible to get the iframe's object? – dlgudwn123 Aug 06 '23 at 11:01
  • It's not about iframes. You need to do it in [page context](/a/9517879). – wOxxOm Aug 06 '23 at 12:15

0 Answers0