aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'p/scripts/main.js')
-rw-r--r--p/scripts/main.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index c0e31ef98..3e825ff96 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -431,8 +431,12 @@ const freshrssOpenArticleEvent = document.createEvent('Event');
freshrssOpenArticleEvent.initEvent('freshrss:openArticle', true, true);
function loadLazyImages(rootElement) {
- rootElement.querySelectorAll('img[data-original], iframe[data-original]').forEach(function (el) {
- el.src = el.getAttribute('data-original');
+ rootElement.querySelectorAll('img[data-original], iframe[data-original], video[data-original]').forEach(function (el) {
+ if (el.tagName === 'VIDEO') {
+ el.poster = el.getAttribute('data-original');
+ } else {
+ el.src = el.getAttribute('data-original');
+ }
el.removeAttribute('data-original');
});
}