From Chrome (and maybe Firefox) you can export an extension to a local folder and view the source. Also, many are on github that you can check out and play with. Find one that does something very simple and tinker, first just changing some text in it, then making bigger changes to get a feel for it.
Check out tampermonkey. You can add javascript to any loaded webpage. It can often replace the need for an extension and it much simpler to use.
You can build for any platform once you can write Javascript. Chrome or mozilla...