aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-08 21:45:47 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-08 21:45:47 +0200
commit6bc37cef47b41821055fc9e2c1ecb0ffbcc5d0d3 (patch)
tree9519b3798c6d2f76b9e5625cb87a2a472bdda181
parent8e5221c6f25deffbe62245024283604b7fa038b2 (diff)
W3C resource-priorities have been abandonned
https://github.com/FreshRSS/FreshRSS/issues/1222
-rw-r--r--app/Models/Feed.php2
-rw-r--r--lib/lib_rss.php7
-rw-r--r--p/scripts/main.js6
3 files changed, 4 insertions, 11 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index f435620c8..21c1ef93d 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -309,7 +309,7 @@ class FreshRSS_Feed extends Minz_Model {
$elinks[$elink] = '1';
$mime = strtolower($enclosure->get_type());
if (strpos($mime, 'image/') === 0) {
- $content .= '<p class="enclosure"><img lazyload="" src="' . $elink . '" alt="" /></p>';
+ $content .= '<p class="enclosure"><img src="' . $elink . '" alt="" /></p>';
} elseif (strpos($mime, 'audio/') === 0) {
$content .= '<p class="enclosure"><audio preload="none" src="' . $elink . '" controls="controls"></audio> <a download="" href="' . $elink . '">💾</a></p>';
} elseif (strpos($mime, 'video/') === 0) {
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index a4cd8e782..b18512484 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -182,10 +182,9 @@ function customSimplePie() {
'onmouseover', 'onmousemove', 'onmouseout', 'onfocus', 'onblur',
'onkeypress', 'onkeydown', 'onkeyup', 'onselect', 'onchange', 'seamless', 'sizes', 'srcset')));
$simplePie->add_attributes(array(
- 'img' => array('lazyload' => '', 'postpone' => ''), //http://www.w3.org/TR/resource-priorities/
- 'audio' => array('lazyload' => '', 'postpone' => '', 'preload' => 'none'),
- 'iframe' => array('lazyload' => '', 'postpone' => '', 'sandbox' => 'allow-scripts allow-same-origin'),
- 'video' => array('lazyload' => '', 'postpone' => '', 'preload' => 'none'),
+ 'audio' => array('preload' => 'none'),
+ 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'),
+ 'video' => array('preload' => 'none'),
));
$simplePie->set_url_replacements(array(
'a' => 'href',
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 2ebd09bcb..3c0a36629 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1027,12 +1027,6 @@ freshrssLoadMoreEvent.initEvent('freshrss:load-more', true, true);
function init_load_more(box) {
box_load_more = box;
- if (!context.does_lazyload) {
- $('img[postpone], audio[postpone], iframe[postpone], video[postpone]').each(function () {
- this.removeAttribute('postpone');
- });
- }
-
document.body.dispatchEvent(freshrssLoadMoreEvent);
var $next_link = $("#load_more");