Add syncState function, initialize button to popup.html