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
lab
lab•17mo ago
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
I am a Dev
I am a DevOP•17mo ago
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?
YAGPDB.xyz
YAGPDB.xyz•17mo ago
Gave +1 Rep to @louisgv
lab
lab•17mo ago
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)
I am a Dev
I am a DevOP•17mo ago
Thanks, do you know of any repository or example that does something similar?
YAGPDB.xyz
YAGPDB.xyz•17mo ago
Gave +1 Rep to @louisgv
Arcane
Arcane•17mo ago
@i.am.a.dev has reached level 1. GG!
lab
lab•17mo ago
No I don't :d
Want results from more Discord servers?
Add your server