From 49d76b4177e176414a70a8576cfda989f715daa1 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 6 Apr 2014 08:36:31 -0700 Subject: [PATCH] fix video controls --- builds/4chan-X.user.js | 6 +++--- builds/crx/script.js | 6 +++--- src/Images/ImageExpand.coffee | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index ca7ab4d3a..1c710a626 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -7705,15 +7705,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 abf036066..4e7fae806 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -7724,15 +7724,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 72637b0fd..b89d11699 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -112,10 +112,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), ->