Promises working on popup page