Use a background page instead of variouse js
Find and get the repo for a domain in chrome
Use the found information to display the popup
Background page