Update popup.js

Turns out scripts must be separated for security reasons, did that.