Search code examples
google-chromegoogle-chrome-extensionmonkeypatching

Chrome extension on an extension?


Is it possible, even in a hacky way, to make a chrome extension for an already existing extension? Or to monkey patch an existing extension?

I wish to make some simple usability changes to a non-open source chrome extension.


Solution

  • Chrome extensions can't access the internal pages of other extensions which have chrome-extension:// address (toolbar popup, page action popup, options page, background page), nor access the content scripts of other extensions.

    The only case where it's possible to influence another extension (implying it's not expecting an external connection from another extension) is when that other extension depends on DOM events and messages and this is the extent of it.

    There's a questionable method though: using the debugger API it's possible to execute code in the context of another extension, change its variables and so on. However a big notification will be displayed on every page in the browser:

    enter image description here