use detector.js as content script

- Removed detector.js to be included in the head of the current page.
- Put popup.html script into separate file.
- popup.html script cleanup.