update popup.js by dropbox demo