We cannot trust that click events will be fired for clicks with the middle button, there are some differences between browsers and apparently this motivated a recent change in the way WebKit used to work (always firing click events regardless of the button used) thus breaking the extension. As a workaround I'm now listening to mousedown and mouseup events directly as they'll always be fired.
… little better. Closes #204
…uickly distribute the load between different services.
… async communication there.
This one was hard to debug, and it feels like a bug in Chrome to me. Apparently RegExp.leftContext and RegExp.rightContext weren't returning the expected result inside desktop notifications. With only one notification everything worked fine, however with more than one being shown things started to get mixed and incorrect or empty content would be shown inside the notification. The solution was to avoid using this properties.
This patch rewrites the popup and desktop notification tweet rendering code to use DOM manipulations to transform tweets rather than regexes, preventing HTML injection issues. Note that the desktop notification rendering code still uses HTML string manipulation for all but the actual replacement of links in the tweet.