Hi there
So, you want to convert that code to make it work as a chrome extension because right now it does not have the proper format to meet the extension criteria.
Also, when do you plan to start the project and when is the deadline, if there is one?
Anyways, feel free to hit me up so we can talk more about this. I am very responsive. All the best