WIP: Firefox addon + build process

**WARNING:** known sloppiness ahead. :smile_cat: 

To build:
```
./bin/hypothesis extension production.ini firefox http://localhost:5000 resource://firefox-at-hypothes-dot-is/hypothesis/data
```

To test:
1. Download the Firefox Add-on
2. ...install it...etc...
3. in `./build/firefox` run:
```
cfx run --binary-args="-url http://w3.org/DesignIssues"
```
(or whatever other URL you like to test with)

Firefox should open with the extension sitting in the top right of the toolbar.

### (Some of the) Known Issues:
* loads irregularly when browsing cached pages (back / forward, 304 Not Modified, etc)
  * likely some other Firefox event that needs to be caught somewhere
* fonts are broken
  * relative URLs in the CSS aren't loading the fonts (despite their being there)
  * making them absolute `resource://` URLs in the CSS file does the trick (but would take some ugly build stuff)
* **all** of the build process for this thing *can* and *should* be heavily refactored
  * it's mostly copy / pasting to jump that hurdle and focus on the extension stuff
  * fully planning to improve it

Enjoy! :tada: 
Apparently Firefox doesn't want loaf the resource:// app.html URL into the
iframe...or at least when I've attempted it the sidebar won't load and I
get event errors on clicking the sidebar icon.

Happy to dig in further.
On Aug 25, 2014 11:49 AM, "Randall Leeds" <notifications@github.com> wrote:

> In h/script.py:
>
> > @@ -54,7 +56,7 @@ def add_base_url(event):
> >      assets_env = request.webassets_env
> >      view_name = getattr(request, 'view_name', None)
> >
> > -    if view_name == 'embed.js' and not assets_env.url.startswith('http'):
> > +    if view_name == 'embed.js' and assets_env.url.startswith('chrome-extension'):
>
> But that's the whole point, no? Otherwise we're loading from the network.
> … <#1480ddb5852cefce_>
> On Aug 25, 2014 6:37 AM, "BigBlueHat" <notifications@github.com> wrote:
> In h/script.py: > @@ -54,7 +56,7 @@ def add_base_url(event): > assets_env =
> request.webassets_env > view_name = getattr(request, 'view_name', None) > >
> - if view_name == 'embed.js' and not assets_env.url.startswith('http'): > +
> if view_name == 'embed.js' and
> assets_env.url.startswith('chrome-extension'): For Firefox the "not http://"
> line was causing app.html to be loaded from resource://.../app.html which
> FF didn't like. Chrome's OK with it, so this narrows the possibility down
> to just the chrome-extension:// URLs. If Safari (etc) act differently, we
> can change this again. — Reply to this email directly or view it on GitHub <
> https://github.com/hypothesis/h/pull/1434/files#r16655121>.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/hypothesis/h/pull/1434/files#r16662505>.
>