popup.js modifications