Add my annotations link under user account menu in sidebar.
Added fix for github issue 885, and fixed another bug I found whereby a long string of characters unbroken by white space wouldn't wrap on the stream page.
If sidebar is closed, display flash messages in the host frame

In sidebar:
 * Save our H instance as window.annotator
 * Add isOpen() method to test if the sidebar is open
 * Removed unused draft dependency from controller

In host document:
 * Add support for showing the flash messages
 * Save the Annotator class as @Annotator
 * Redefine the notification level constants in Annotator.Notification
   so that they are consistent with the ones used in the sidebar

Flash message service:
 * Add workaround for duplicate "invalid uname or pw" error message,
   and also swallow the "your submission was invalid" in this case.
 * When the sidebar is closed, pass the message to the host frame
   instead.

Fixes #886.
Merge pull request #902 from hypothesis/886-flash-over-host-2

If sidebar is closed, display flash messages in the host frame
Emit an 'annotatorReady' event when guest functions become available
Added CodeAuth plugin, which can expose user authentication functions from the host/guest side

If you load this plugin (which is disabled by default), these methods
can be used for integrating H login mechanism with code living
on the host page:

 * annotator.getLoginStatus()
 * annotator.loginWithUsernameAndPassword(username, password)
 * annotator.logout()
 * annotator.registerUser(username, email, password)

These all return promises.

Furtheremore, the following events have been introduced:

 * annotatorLogin, upon successfull login
 * annototorLogout, upon log out

Note: these events are *not* fired in cases when the events were
triggered by a call from the given host/guest-side annotator instance;
use the promises to react those events. The events only happen if
these events were triggered from the sidebar, or from other host/guest
frames.
Merge pull request #903 from hypothesis/882-login-from-code-3

CodeAuth plugin (user authentication functions for host side)
Revert "Merge pull request #903 from hypothesis/882-login-from-code-3"

This reverts commit ba92681d2fed403a00b49e13697b13aa37e0e855, reversing
changes made to 71dd9111bad26d5d4235ecdd1b42c60591cd2f35.
Added PDF support - we can now annotate PDF documents

 * Update dom-text-mapper to fcd26632 (master branch)
 * Update dom-text-matcher to fcd26632 (master branch)
 * Update Annotator to f1e08bdd (maintenance branch)

 * Updated assets.py for the changed Annotator files and libraries
 * Updated JSChannel with a patch to allow talking to pdf.js
 * Updated our code to follow Annotator API changess
 * Updated the heatmap for two-phase anchoring and virtual anchors

The change in embed.txt fixes a sporadic code insertation problem.

For pages with no script tags, our embed script sometimes crashed.
I have already fixed this problem for YepNope (see #607), but now
it has come back in our own code.

I am not sure why have not this happened before,
but it definitely was happening now.

I applied the same fix that worked with YepNope. It worked again.
Merge pull request #904 from hypothesis/757-pdfjs-support-8

Added PDF support - we can now annotate PDF documents
Fix merging artifact
Merge pull request #901 from RawKStar77/742-addmyannotationslink

Add my annotations link under user account menu in sidebar.
Update Annotator's PDF plugin to 323e71bc

This version delays the PDF scanning until the document is ready.

Fixes #892.
Update Annotator's PDF plugin to 909ccab15

This version fixes another race condition during initialization.

Hopefully fixes #892 for good.
Update Annotator's PDF plugin to 957c4e9a9

This version fixes yet other race condition during initialization.

Fixes #892. Hopefully, it really stays dead this time.
Improve extension code injection logic (delay + deduplication)

Two changes:
 * When loading a new document in a tab, we get two onUpdated
   notifications: one with the "loading" status, and one with th
   "complete" status. We don't need to try to inject our code
   in the "loading" status, so let's just drop that notification.
 * When injecting our code to a page, wait a sec before actually
   running our script. This is necessary because there are cases
   (expecially with PDF.js) when the page is rewriting it's code
   like crazy, so any script tags we add will be deleted/overwritten.
   So we wait. Also, there are cases when we get several injectation
   attempts in succession. (For PDF, there are 4 onUpdate notifications:
   2 "loading" and 2 "complete" types.) So we keep track of the tabs
   where we already have a pending injection, and don't try to do it
   again.

Fixes #893.
Added some generated files to gitignore
Merge PDF.js manifest into chrome extension

Closes #906
Introducing typed anchor support

 * Updated Annotator to de4c0dfc (maintenance branch), which has
   typed anchors support merged.
   See https://github.com/hypothesis/annotator/pull/18 for explanation.

The H specific parts:

 * Following Annotator API and packaging changes
 * The heatmap got a lot trickier. Since it can no longer make any
   assumption about the actual implementation of the highlights and
   anchors, now it does not rely on any data inside them. That includes
   the start and stop character offsets, too, which was previously used
   to find the nearest anchor for the up/down arrows on.
   We can't assume that all anchors have that data.
   Unfortunately, the Y coordinate is not always available, because
   the required part of the DOM might not be rendered yet.
   So the only data we have is the page number. (All anchors have page
   numbers). In the first phase, we only collect the anchors from the
   nearest page. Then we go there, to assure that it's rendered.
   When all the anchors have been realized, we select the nearest one,
   and actually scroll to it. This way, we can make it work with
   all kinds of anchors/highlights.
Merge pull request #924 from hypothesis/380-typed-anchors-4

Introducing typed anchor support