Yes. You need to take any JS example. And replace the extension JS code with JS generated by Nim. You may need to write couple of specific JS/Nim interface functions, but that should be simple.
This is absolutely possible. I started writing some chrome extensions with nim awhile back but lost interest in developing an extension for my needs. If I recall just needed to import some of the chrome extension API.