updated popup.js example