I want to know if i write a Google Chrome extension, will anyone be able to use my code?
Although the question has been posted long time ago, and received some answers (none accepted), I am adding my answer to complete previous answers.
Open-source, referring to software, refers to a «source code made available with a license in which the copyright holder provides the rights to study, change and distribute the software to anyone and for any purpose.» (source: Wikipedia)
Unless explicitly stated, software is copyrighted by the author. Even if you have access to sources, without an explicit permission, you can't read it. It's as if you find opened the door of a house; you have the ability to look into it and even walk in. But you don't have any rights to do it, and doing it is likely to put you in trouble.
Everybody can view source code of your extension because it's written in javascript. Nobody has the right to reuse, change and/or distribute your code without your explicit permission.
Moral of the story: never put any sensitive data in your extensions, because it's extremely insecure.
About Open Source, I suggest to read also the Open Source Definition by OSI
Since Chrome Extensions are written in JavaScript, and everyone can open the Inspector and see the resources for every extension then, yes, everyone can see the source of your extension. This doesn't mean they'll be able to use it. If you obfuscate the code or use similar techniques to make the code less readable then you can avoid that others look into how your extension works. But as said, they can still use the Inspector to analyze the extension.
If you must hide the secret algorithm in your extension, then you could use a server back-end to handle the secret stuff, completely avoiding anyone can look at your code.
I am not sure whether they are open-source or not, but you can easily see the code of any chrome extension. It is also up to the developers how their code are structured so that whether other can use it by just copy paste or by analyzing the script code.
However, you can also use the Console to analyze the javascript code and use it.
Also, there is a easy and simple in tool in Google Chrome store to view any chrome extension code.
You can download it here (CRX Viewer)
https://chrome.google.com/webstore/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin
Steps to see code using CRX Viewer :
1) Now after installing the Extension, open it and paste the link of the other extension(which you want to see the code).
ScreenShot of the step
2) Now click "Open in this Viewer" and Here we go ....
Generated source code of extension
3) Now you can easily download the code,or view one by one.
Every Chrome Extension gives the user the following rights by default:
5.2 You grant to the user a non-exclusive, worldwide, and perpetual license to perform, display, and use the Products and any content contained in, accessed by, or transmitted through the Products in connection with Google Chrome. If you choose, you may include a separate end user license agreement (EULA) in your Product that will govern the user’s rights to the Products in lieu of the previous sentence.
Read the whole agreement here: http://developer.chrome.com/webstore/terms
That doesn't mean that the user has the right to alter and/or distribute your code, but as others have pointed out, they will be able to see your JavaScript if they want to.
Yes they will, it's mandatory open source !
It looks like people will be able to see your code. If they can see your code, they can potentially use it.
C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions
~/Library/Application Support/Google/Chrome/Default/Extensions/
or ~/.config/google-chrome/Default/Extensions/
The source code is available for inspection/debugging/experimenting & whatever people might want to do. You may try to use a JavaScript obfuscator.