Probably the most obvious reason why you may want to go through the source of Chrome extensions is to audit them before you install them in the browser.
This is especially true if you do not know the author of the extension, or if the extension is offered on a third-party site and not the official Chrome Web Store.
Another reason is to check out how something was done. Maybe you develop extensions as well for the browser and just want to find out how the author of an extension implemented a certain feature that you are interested in. Since you can access the source code, you can use it for learning.
And access to the source is also useful if you want to modify the extension, for instance by making it efficient, or by removing features of it.
Now, the first and biggest hurdle is getting your hands on the Chrome crx file. While you can install the extension in Google Chrome to download it that way, it is not always an option, especially not if you want to audit it first before you install it.
If that is not a problem, check out the official extension locations:
Note that the name of the application may be different depending on which version of Google Chrome you are using. It may be chromium or chrome-sxs instead for example.
Here you find all installed extensions as folders. You find the ID on the chrome://extensions/ page. Compare the ID listed on that page to the directory structure.
Alternative without installation
Update: The following method does not work anymore. You can use a browser extension such as Get CRX to download any Chrome extension to the local system. End
You can download any Chrome extension from the store without installing it first in the browser. The method works in all web browsers, not only in Google Chrome. Here it is:
If you download the extension instead of installing it, you need to unzip it first before you can view the source code of it. You can use a program such as 7-Zip for that for example.
Just right-click the downloaded extension file and select 7-zip > Extract To from the menu that opens up.
This extracts the extension into a folder in the same directory it is stored in.
From here, you can browse the various files it ships with in plain text editors or specialized editors.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.