diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 03e905bee..c337229ea 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -8067,15 +8067,15 @@ TrashQueue.remove(el); } else { el = post.file.fullImage = $.el((isVideo ? 'video' : 'img'), { - className: 'full-image', - src: src || post.file.URL + className: 'full-image' }); if (isVideo) { el.loop = true; } $.on(el, 'error', ImageExpand.error); + el.src = src || post.file.URL; } - if (el.isVideo) { + if (isVideo) { el.controls = Conf['Show Controls']; } position = el.controls ? thumb.parentNode : thumb; diff --git a/builds/crx/script.js b/builds/crx/script.js index a6b0a2c2b..2293ecc83 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -8106,15 +8106,15 @@ TrashQueue.remove(el); } else { el = post.file.fullImage = $.el((isVideo ? 'video' : 'img'), { - className: 'full-image', - src: src || post.file.URL + className: 'full-image' }); if (isVideo) { el.loop = true; } $.on(el, 'error', ImageExpand.error); + el.src = src || post.file.URL; } - if (el.isVideo) { + if (isVideo) { el.controls = Conf['Show Controls']; } position = el.controls ? thumb.parentNode : thumb; diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index 05a808be8..dd851f189 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -109,10 +109,10 @@ ImageExpand = else el = post.file.fullImage = $.el (if isVideo then 'video' else 'img'), className: 'full-image' - src: src or post.file.URL el.loop = true if isVideo $.on el, 'error', ImageExpand.error - el.controls = Conf['Show Controls'] if el.isVideo + el.src = src or post.file.URL + el.controls = Conf['Show Controls'] if isVideo position = if el.controls then thumb.parentNode else thumb $.after position, el unless el is position.nextSibling $.asap (-> isVideo or el.naturalHeight), ->