Some gifv links on imgur.com do not have an associated webm video
and only provide an mp4 video. Add two source elements with proper
mimetypes for both types of video. The video player will fall back
to the secondary source if the first cannot be loaded (due to 404)
Example: Trying to load the webm version of this video
http://i.imgur.com/i7D4GRb.webm
will result in a 302 redirect to the gifv url, which tries to load
an HTML document. This will cause our video player to reject the
document as an invalid video format (text/html); on some videos it
will simply 404. The mp4 version is available and our player will
fall back to that.
The Asciinema cast plugin regex was faulty. Casts can have /[a-z]/ characters, not only digits /\d)
Here is a test cast for you to run: https://asciinema.org/a/29qfl1dwsgd25o91nfv3dvvbn
(squashed two commits --@lorenzhs)
This commit changes the plugins that uses angular.element to load
resources directly to instead return a function that runs
angular.element. When the browser runs angular.element('<img>') and gets
a src attr it will fetch the content in the src. This makes the
browser running gb automatically fetch all plugin content that gets
linked even if the user didn't request it.
Maybe we could change our plugin architecture to split the match
function and the generator functions so this could be solved more
elegantly.
This is still technically a hack, the elements should really be defined in a view with templates, but it fixes the issue with sanitize where it can't sanitize if it can't parse HTML.
There's no need to check for every GET parameters (using the line ending
'$' character), we can just add a word boundary (the '\b' character)
instead. Thus, revert commit b939bc7ca8.
The recent angular update changed the format of the hash keys.
They're now in the format 'object:123' (etc), which isn't a valid
CSS class name any more, but we used the $$hashKey as such.
I used this opportunity to introduce a bit of abstraction there as well
Requires turning IrcUtils into an Angular service, because the global variable
trick won't work with use strict.
Reuse is still easily possible by removing the angular wrapping around it.