Chrome/Firefox: access source of an extension

后端 未结 4 989
野性不改
野性不改 2021-02-02 02:46

Do Chrome or Firefox make your extension\'s source code open to the host machine? And if yes where are the respective folder on Mac?

相关标签:
4条回答
  • 2021-02-02 02:51

    Yes, assuming some or all of your extension is written in an interpreted and un-obfuscated language. Plain Javascript is common for extensions in both browsers.

    For any firefox extension, if you save the .xpi file instead of installing it, it is just a zip file and you can open it with any archive tool (e.g. 7zip or WinZip).

    The same goes for the .crx files Chrome. As an test, I just downloaded and opened the .crx for Google Mail Checker Plus using 7zip, and it looks like this is entirely written in javascript and all the source can be read.

    In either case, how much usable source code you can get from this depends on the language(s) that are used in the extension.

    Google Chrome installs the extension into ~/Library/Application Support/Google/Chrome/Default/Extensions/<EXTENSION_ID>/ and registers it in its Preferences file (according to this).

    As heb says, Firefox installs the extension to ~/Library/Application Support/Firefox/Profiles/PROFILE_ID/extensions/EXTENSION_ID/

    0 讨论(0)
  • 2021-02-02 02:51

    For Firefox the path is:

    /Users/YOUR_LOGIN/Library/Application Support/Firefox/Profiles/PROFILE_ID/extensions/EXTENSION_ID/
    
    0 讨论(0)
  • 2021-02-02 02:53

    view online

    View a Chrome/Firefox/Opera extension/addon’s source in browser (without downloading):
    https://robwu.nl/crxviewer/

    bookmarklet

    bookmarklet usage

    Click the bookmarklet when on an extension’s page in the Chrome Web Store, Firefox addon gallery or Opera addon gallery.

    bookmarklet source
    javascript: location.href='https://robwu.nl/crxviewer/?crx='+document.location.href; 
    
    bookmarklet link

    view extension source online (Chrome .crx) @ https://robwu.nl/crxviewer/?crx= ← You can drag this link to your bookmark bar to create the bookmarklet, but you have to edit its URL afterwards: Delete everything before javascript, including the single slash: http://delete_me/

    0 讨论(0)
  • 2021-02-02 03:06

    I know it's an old topic but for future research.. it could be interesting..so following the link : How to find extension code?

    This article explains very well where are located extensions code for Firefox, Chrome (working on Chromium too of course) on Ubuntu and Windows!

    Best,

    0 讨论(0)
提交回复
热议问题