diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index e0ee4d8b2..4deeddb04 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -11205,7 +11205,7 @@ $.rmClass(el, 'gal-highlight'); } $.addClass(thumb, 'gal-highlight'); - elType = /\.webm$/.test(thumb.href) ? 'video' : /\.pdf$/.test(thumb.href) ? 'iframe' : 'image'; + elType = /\.webm$/.test(thumb.href) ? 'video' : /\.pdf$/.test(thumb.href) ? 'iframe' : 'img'; $[elType === 'iframe' ? 'addClass' : 'rmClass'](doc, 'gal-pdf'); file = $.el(elType, { title: name.download = name.textContent = thumb.title diff --git a/builds/crx/script.js b/builds/crx/script.js index 39cf15d0d..6c1c9ad7a 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -11242,7 +11242,7 @@ $.rmClass(el, 'gal-highlight'); } $.addClass(thumb, 'gal-highlight'); - elType = /\.webm$/.test(thumb.href) ? 'video' : /\.pdf$/.test(thumb.href) ? 'iframe' : 'image'; + elType = /\.webm$/.test(thumb.href) ? 'video' : /\.pdf$/.test(thumb.href) ? 'iframe' : 'img'; $[elType === 'iframe' ? 'addClass' : 'rmClass'](doc, 'gal-pdf'); file = $.el(elType, { title: name.download = name.textContent = thumb.title diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 710b66ada..d2646eba3 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -137,7 +137,7 @@ Gallery = else if /\.pdf$/.test(thumb.href) 'iframe' else - 'image' + 'img' $[if elType is 'iframe' then 'addClass' else 'rmClass'] doc, 'gal-pdf' file = $.el elType, @@ -146,7 +146,7 @@ Gallery = Gallery.error file, thumb file.src = name.href = thumb.href - $.extend file.dataset, thumb.dataset + $.extend file.dataset, thumb.dataset nodes.current.pause?() unless nodes.current.error $.replace nodes.current, file if elType is 'video'