Make MP4 behavior consistent with WEBM, and don't error on files without extension.
This commit is contained in:
parent
5c59ecf0ab
commit
2b52a66550
@ -53,7 +53,11 @@ ImageLoader =
|
||||
prefetch: (post, file) ->
|
||||
{isImage, isVideo, thumb, url} = file
|
||||
return if file.isPrefetched or !(isImage or isVideo) or post.isHidden or post.thread.isHidden
|
||||
type = if (match = url.match(/\.([^.]+)$/)[1].toUpperCase()) is 'JPEG' then 'JPG' else match
|
||||
if isVideo
|
||||
type = 'WEBM'
|
||||
else
|
||||
type = url.match(/\.([^.]+)$/)?[1].toUpperCase()
|
||||
type = 'JPG' if type is 'JPEG'
|
||||
replace = Conf["Replace #{type}"] and !/spoiler/.test(thumb.src or thumb.dataset.src)
|
||||
return unless replace or Conf['prefetch']
|
||||
return if $.hasClass doc, 'catalog-mode'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user