How to access the methods or variables of another third-party extension
hello, is there any way to access the methods or variables of another third-party extension (I suppose these are declared in its content script)?
I want to modify the behavior of a third party extension and it would be easier for me to access its variables or methods, and make small changes to it, or call methods from my extension,than scraping the HTML it adds to the web, or doing everything from scratch
Thanks
8 Replies
You can't unless there's explicit permission from that extension to allow your extension (or target site) to call and send message to it
otherwise, your extension will have to compete and race with that extension
each extension runs on its own isolated environment, the scope is not shared by default
Thanks, I know the extension works on "X" site, if I create a content script for "X" site, can I access something that extension does there?
Gave +1 Rep to @louisgv
I assume you and that extension do not know each other. If they expose any indicator into the main world, you can access that. Otherwise, you would need to escalate permission to read the user's file system, write a debugger to chrome, and inspect the memory allocator and hunt down that extension's memory site.
(make sure your user is aware of the perm escalation, or you risk being flagged as malware)
Thanks, do you know of any repository or example that does something similar?
Gave +1 Rep to @louisgv
@i.am.a.dev has reached level 1. GG!
No I don't :d