Commit graph

103 commits

Author SHA1 Message Date
Michael Hazell dcba80f141
Video plugin: show video controls
Previously this would have to be toggled in the right-click menu on Chrome, etc.
2018-06-10 16:49:11 -04:00
Felix Eckhofer 1b6ba78acd
Recognize /raw/ pastebin URLs 2017-08-30 19:08:16 +02:00
Lorenz Hübschle-Schneider 8a230e9bf3 imgur: force https (2), fix comment 2017-04-19 14:05:37 +02:00
Lorenz Hübschle-Schneider 6d7de0c746 imgur: force https, simplify regex 2017-04-19 14:01:57 +02:00
Jordan Callicoat 14879811a5 Make videoPlugin work for all imgur gifv videos
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.
2017-04-18 16:55:44 +00:00
Jordan Callicoat c880546882 Add streamable.com video plugin 2017-04-14 13:16:55 +00:00
Lorenz Hübschle-Schneider cade004f31 Merge pull request #906 from lorenzhs/spotify-regex
Add play.spotify.com to spotify plugin
2017-04-05 14:32:30 +02:00
Tobias Theuer 9998f22c1e Replaced 3 no-protocol links with https-links.
Now they work in the Electron app!
2017-03-15 23:36:46 +01:00
Lorenz Hübschle-Schneider b7ce8fa75f Merge pull request #898 from nyuszika7h/add-file-formats
Add more file formats
2017-03-15 09:46:02 +01:00
Lorenz Hübschle-Schneider 8bdefaa20b Merge pull request #912 from ttheuer/youtube-fix
Youtube fix, 2nd try
2017-03-15 09:44:14 +01:00
Tobias Theuer ce3ac634cb Actually fixed regex. 2017-03-15 03:55:22 +01:00
Tobias Theuer a769a0ed4e Fixed imgur-embeds in Electron app. 2017-03-15 03:32:43 +01:00
Tobias Theuer 7e7da76006 Simplified regex. Added video info. 2017-03-15 03:29:26 +01:00
Lorenz Hübschle-Schneider 0dc003f220 Add play.spotify.com to spotify plugin 2017-03-01 14:26:14 +01:00
nyuszika7h 49531f8f5b Add more file formats 2017-02-12 22:33:45 +01:00
nyuszika7h f280c7c6f1 Add some image formats
Added support for .bmp, .svg and .webp.
2017-02-08 10:42:43 +01:00
Tor Hveem b29dc42a4a Merge pull request #854 from lorenzhs/plugin-dedup
Plugins: don't show plugin repeatedly for same URL in same message
2016-11-11 12:56:33 +01:00
Lorenz Hübschle-Schneider 7ba8ba202e Spotify: also match other types of embeds (playlists and artists) 2016-11-01 13:09:06 +01:00
Lorenz Hübschle-Schneider 71d2cefce1 Escape dots in plugin regexes
See #519
2016-11-01 13:07:12 +01:00
Lorenz Hübschle-Schneider ec221af52e Plugins: don't show plugin repeatedly for same URL in same message
Fixes #636
2016-11-01 11:08:40 +01:00
Evan Tschuy d1921c49e2 Add underscore to youtube regex 2016-08-11 01:21:35 -07:00
kurros 4a0ed97934 allow browser to use https for pastebin embed 2016-08-05 18:42:41 -04:00
Ninjex 4971baefec Update plugin.js (#795)
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)
2016-07-28 12:52:18 +02:00
Lorenz Hübschle-Schneider bfb5af68b4 Gist plugin: ignore trailing slashes and anchors
Supersedes #783
2016-06-25 14:40:24 +02:00
Peter Elmers 05f5629ba7 Please linter 2016-04-21 19:13:27 -05:00
Peter Elmers fa992e2fa5 Add a pastebin plugin 2016-04-21 18:37:51 -05:00
Simen Graaten b7183fb404 Add preview of .mp3, .ogg and .wav links via <audio> tag.
This fixes #745
2016-02-19 17:57:22 +01:00
Eternal 7753922137 Improving urlRexexp for plugins 2016-01-21 10:16:42 +01:00
Furkan Alaca 41659493cd parse dropbox URLs for image preview plugin (v5) 2016-01-02 16:01:06 -05:00
hormigas b5594d5754 adding imgur gifv support to the videoPlugin 2015-11-13 21:38:32 +00:00
Tor Hveem a02573a9c2 Construct plugin elements async. Fixes #660
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.
2015-10-19 14:54:21 +02:00
Alex Schneider 1d628ed849 Remove comments that we don't really need 2015-10-17 16:23:48 -07:00
Alex Schneider 6dcb579de4 Fix sanitization by constructing elements in Javascript.
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.
2015-10-17 16:15:42 -07:00
David Cormier 0afa7bc184 plugins: sanitize user input before passing it to plugins 2015-10-16 15:13:53 -04:00
Colin Arnott 2f8ab9dbf3 roll back tls upgrade for giphy plugin link, as it conflicts with printed link 2015-09-28 17:35:28 +00:00
Colin Arnott 875001f1b2 simplify regex matching and increase readability of the giphy plugin and have plugin link to original userfacing url, not cdn image file 2015-09-26 22:40:30 +00:00
Colin Arnott 03a6e391f6 added plugin support for giphy gifs as embedded content and created testcases 2015-09-26 05:06:11 +00:00
David Cormier d8c4ba78c1 plugins: add html5 video support
Shows ogv, mp4 and webm files inside a video tag
2015-02-17 09:48:18 +01:00
Vivien Didelot c4bddc993d Revert "Check GET parameters in image embedding"
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.
2015-02-13 09:05:45 +01:00
Lorenz Hübschle-Schneider c57911db64 Restructure plugin constructors to make them more convenient 2015-02-08 21:48:31 +01:00
Lorenz Hübschle-Schneider 4b65847b46 Rewrite youtube plugin with urlPlugin
Remove URL without protocol from tests
2015-02-08 11:23:32 +01:00
Lorenz Hübschle-Schneider beaa3426dd Rewrite vine plugin with urlPlugin 2015-02-08 11:17:06 +01:00
Lorenz Hübschle-Schneider 18c0db6c4f Fix Asciinema plugin 2015-02-08 11:16:55 +01:00
Vivien Didelot ab260cb5a7 plugins: add Vine support
This commit adds support for Vine embeddable content.
2015-01-30 19:13:17 -05:00
Vivien Didelot b365272aa6 plugins: (image) support :size suffix
Some images URL (such as Twitter hosting site twimg.com) are suffixed
with :size where size can be small, medium or large.
2015-01-14 10:38:25 -05:00
Kenneth Chung fdc598c00f fix a typo and some grammar mistakes 2014-10-14 22:21:22 -07:00
Lorenz Hübschle-Schneider bc037720bd Fix plugin selectors after angular upgrade
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
2014-09-28 21:01:13 +02:00
Lorenz Hübschle-Schneider a80db339f8 Use strict
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.
2014-09-07 16:55:18 +01:00
Lorenz Hübschle-Schneider b939bc7ca8 Check GET parameters in image embedding
This is a great candidate for the tests!
2014-08-18 16:41:30 +01:00
Lorenz Hübschle-Schneider 1235a5e148 Embed Dropbox images
We need to pass a parameter, "?dl=1", to get the actual file
2014-08-18 16:37:45 +01:00