Week 2:Extensive Woes
The extension my group and I are working on still has a ways to go. While I set up an overall structure of files for the extension, there is still quite a bit of code we have yet to write. Both our background script and content script are in their infancy, and currently our major goal is to correctly interact with the topSites API we are using in order to get our desired result. The other facet to our extension is a popup that executes the background script to kickstart the content script after the user clicks one of the buttons, but that seems to be having issues.
I attempted getting our popup up and running by writing some preliminary HTML and CSS as well as calling the background script in the HTML file. Unfortunately, the popup seems to always display the error message if the script call is included in the HTML. If I comment out the line with the script call, the popup will appear, buttons and all, but the buttons don’t actually do anything. This leads me to believe that there’s a problem with one of our scripts, but I have yet to figure out what could be the issue in our scripts.
Another oddity, I hesitate to call it an issue, that we ran into is in our extension manifest. Though I modeled our extension structure off of the beastify extension from Mozilla’s Extensions Tutorial page, Firefox has trouble loading our extension unless we have the “content_scripts” tag in the manifest while the beastify manifest works fine without the “content_scripts” tag. Even though I imitated the way the popup calls the scripts, for some reason I have yet to understand, our extension won’t properly load without the tag. For now, we’ve outfitted the manifest with both the “background_scripts” and “content_scripts” tag to allow proper loading into Firefox. With two more days until due, our group should be able to work out the kinks in our extension and present a final working product.