Recognize JPEG files with .jfif extensions as images for purposes of Image Hover etc.; also recognize .avif and .jxl files as images.

This commit is contained in:
ccd0 2023-02-28 14:15:43 -08:00
parent 7295b21b73
commit 71873cd7b2

View File

@ -490,7 +490,7 @@ $.unescape = (text) ->
text.replace(/<[^>]*>/g, '').replace /&(amp|#039|quot|lt|gt|#44);/g, (c) ->
(({'&amp;': '&', '&#039;': "'", '&quot;': '"', '&lt;': '<', '&gt;': '>', '&#44;': ','})[c])
$.isImage = (url) -> /\.(jpe?g|png|gif|bmp|webp)$/i.test url
$.isImage = (url) -> /\.(jpe?g|jfif|png|gif|bmp|webp|avif|jxl)$/i.test url
$.isVideo = (url) -> /\.(webm|mp4|ogv)$/i.test url
$.engine = do ->