Create popup.js

The JavaScript code for most of the extension's functionality