rebuilt popup as dom element, added like button with onClick bound.