I want to know if i write a Google Chrome extension, will anyone be able to use my 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.