Extension Source Viewer is a free browser add-on for the Firefox web browser that enables you to view the source code of Firefox add-ons and Chrome extensions.
It is recommended to verify that browser add-ons are legitimate before you install them in your browser. The reason for this is simple: browser extensions may record, transfer, or change what you do on the Internet.
Malicious extensions may grab passwords or sensitive information you enter, others may throw annoying ads on sites you visit, and a third kind may record your browsing history and create profiles to sell them to the highest bidder.
While you may get some reassurance by reading user reviews and ratings, or looking at the extensions track record, it may not be enough for the vast majority of extensions out there.
New extensions for instance may not have any ratings yet, and they don’t have a track record either.
The only surefire way of making sure that an extension is legitimate and not malicious or problematic is to look at the source code.
Extension Source Viewer for Firefox
Extension Source Viewer for the Firefox web browser supports Firefox add-ons and Chrome extensions.
It indicates its functionality in Firefox’s address bar when it detects an extension on a page, and may also be activated from the right-click context menu.
The main difference between functionality that the address bar icon and the right-click context menu entry offer is that the address bar icon supports downloading the extension as a zip file next to viewing its source directly in the browser.
The viewing of the source code works pretty much as you’d expect it to. Once you select the option, the source code of the extension is opened in a new tab.
Since it is made up of multiple files, you get a listing of all those files on the left to quickly go through them. Selecting a file displays its code on the right.
You may use the filter option on top of the file listing to find particular files quickly. One interesting option is the ability to filter certain types of files. You may hide images or locales for instance to reduce the number of files listed on the left.
The source code uses color coding, but that is about it. You may select and copy any code, which may come in handy if you want to research certain functions.
The links at the top right open the page of the extension on the official repository, download it to the local system, or load an open dialog that enables you to load another browser add-on to view its source.
Good news is that the add-on supports both Firefox add-ons and Chrome extensions. Since you may load a percentage of Chrome extensions in Firefox, it is good that the extension supports Chrome extensions as well.
The Firefox add-on works for the most part like its Chrome cousin Chrome Extension Source Viewer.