Skip to content

Commit

Permalink
Merge pull request #961 from GrosPoulet/master
Browse files Browse the repository at this point in the history
Support for playlists (M3U8)
GrosPoulet authored Jun 18, 2022
2 parents e412b9d + e70419e commit 41da7cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/default.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name: 'Default',
version:'0.4',
version:'0.5',
prepareImgLinks: function (callback) {
var res = [];
const reVideos = /\/[^:]+\.(?:3gpp|m4v|mkv|mp4|ogv|webm)(?:[\?#].*)?(?:\/)?$/i
const reImages = /\/[^:]+\.(?:bmp|gifv?|ico|jpe?g|png|svg|webp|xbm)(?:[\?#].*)?(?:\/)?$/i
const rePlaylists = /\/[^:]+\.(?:m3u8)(?:[\?#].*)?(?:\/)?$/i
$('a[href]').filter(function () {
if (typeof(this.href) != 'string')
return false;
@@ -15,6 +16,8 @@ hoverZoomPlugins.push({
return true;
if (this.href.match(reVideos))
return true;
if (this.href.match(rePlaylists))
return true;
return false;
}).each(function () {
var _this = $(this), data = _this.data();

0 comments on commit 41da7cd

Please sign in to comment.