Sunday, June 26, 2011

Linux - Ubuntu: Source code of Google Chrome extension

How to read the source code of Google Chrome extensions?

Get the extension ID:

There are two ways to get the extension ID.. If the extension is installed in your computer, then you can get the id from the Extensions menu. Click on the wrench icon and select Extensions. In the Extensions page, each extension will be listed with some details like its name, description, version and most importantly an id. The id is a strange looking string with around 32 characters. For eg isrdeffdsrsefrsehrsskietqrcfdiok

If you have not installed the extension, you can get the extension id by going to the extension’s page in the official Chrome extensions page . The extension id corresponds to the xxxx in the sample url – https://chrome.google.com/extensions/detail/xxxx.

In Ubuntu, for an extension with id say xxxx, the source code is located at ~/.config/google-chrome/Default/Extensions/xxxx . In this case Default is the name of my profile. If you have a different profile, substitute it. This is the root folder and it has child folder with the name of the version. Once you go in, you can see the extension code..

No comments:

Post a Comment