Updated popup.js