Skip to content
Add-on / web app to view the source code of Chrome / Firefox / Opera 15 extensions and zip files.
JavaScript HTML CSS
Branch: master
Clone or download

Latest commit

Rob--W Update screenshot to comply with CWS policy
The screenshot has been modified by removing the white text inside the
green button, because the Chrome Web Store found that the screenshot is
not compliant with their policies:

"There shouldn't be "Add to chrome/Added to chrome" any where in your screenshots."
Latest commit 30ae3c4 Aug 30, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
chrome-web-store Update screenshot to comply with CWS policy Aug 30, 2019
external Upgrade shelljs to latest version Aug 31, 2016
firefox-stuff Remove Firefox compatibility notes Oct 21, 2018
opera-addon-gallery Publish Opera add-on Oct 17, 2013
src Version 1.6.11 Aug 10, 2019
.gitignore Hide *.swp files from source control Aug 21, 2016
LICENSE Explicitly use MPL-2.0 license #44 Feb 26, 2018
README.md Remove Firefox compatibility notes Oct 21, 2018
make.js Calculate Extension ID and display it in the UI Aug 10, 2019
package.json Explicitly use MPL-2.0 license #44 Feb 26, 2018

README.md

Chrome extension source viewer (CRX Viewer)

View the source code of any Chrome extension in the Chrome Web store without installing it.
https://chrome.google.com/webstore/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin

Also available for Opera and Opera's add-on gallery.
https://addons.opera.com/extensions/details/extension-source-viewer/

And also available for Firefox and addons.mozilla.org (WebExtensions and other Firefox addon types). https://addons.mozilla.org/firefox/addon/crxviewer/

Online demo (select a .crx / .nex / .zip / .xpi from your disk or a URL to try out the viewer):
https://robwu.nl/crxviewer/

Features

This Chrome extension adds a button to right of the omnibox when a CRX file has been detected. By default, this is only enabled on the Chrome Web Store. Upon clicking the button, two actions become available:

  • Download extension as zip file
  • View source

The default action (showing the above options) can be changed via the "Primary action on click" menu that appears when you right-click on the extension button.

The "View source" option opens a new tab with a simple viewer, with the following features:

  • Download-as-zip and download-as-crx at the upper-right corner.
  • List of file names, and the option to filter files with a regular expression.
  • Find files containing a string, or with content matching a regular expression.
  • Quickly jump between search results, or from/to a specific line.
  • Automatic beautification (formatting) of code
  • Syntax highlighting
  • Image preview
  • Show hashes (md5, sha1, sha256, sha384, sha512) of the file content.
  • View content of embedded zip files.
  • Download Chrome Web Store extensions for a different platform (e.g. Chrome OS or NaCl).
  • View the contents of any URL or zip file.
  • Permalink to file and search result within a zip or extension file.

As mentioned before, this extension activates on the Chrome Web Store by default. It's also possible to view the source code of Chrome, Opera 15+ and Firefox extensions that are hosted elsewhere. Further, there is an option to show a contextmenu entry on links whose target is a Chromium extension. Both features can be toggled at the options page.

The "View source for all extensions" only shows a button when it detects the download of an extension. This detection is implemented through MIME-type sniffing using the declarativeWebRequest API, which is only available to Chromium beta/dev users (though it should soon be available to the general public).

Copyright

(c) 2013 - 2018 Rob Wu rob@robwu.nl (https://robwu.nl/)

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

You can’t perform that action at this time.