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?
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/
For Firefox the path is:
/Users/YOUR_LOGIN/Library/Application Support/Firefox/Profiles/PROFILE_ID/extensions/EXTENSION_ID/
View a Chrome/Firefox/Opera extension/addon’s source in browser (without downloading):
https://robwu.nl/crxviewer/
Click the bookmarklet when on an extension’s page in the Chrome Web Store, Firefox addon gallery or Opera addon gallery.
bookmarklet sourcejavascript: 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/
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,