That is already how I do it, the buttons control the div visibility that the iframes lived in.
However the data inside the page (innerText) is not static, that updates and we check every 5 seconds (less if the extension menu is closed) and update the data accordingly