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

from 71873cd7b22a565c2a41fa24f63f7504152683eb
This commit is contained in:
Tuxedo Takodachi 2023-03-18 10:40:40 +01:00
parent 817ddd51bf
commit a66505c5c0

View File

@ -565,7 +565,7 @@ $.unescape = function(text) {
return 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 = (function() {