updated the popup.js example