mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-10-15 21:11:14 +02:00
af_comics: simplify srcset attribute handling for gocomics pseudo-feeds
This commit is contained in:
parent
2ab49fec9a
commit
de1b9acba1
@ -125,15 +125,8 @@ class Af_Comics extends Plugin {
|
|||||||
|
|
||||||
if ($node) {
|
if ($node) {
|
||||||
$node->removeAttribute("width");
|
$node->removeAttribute("width");
|
||||||
|
|
||||||
if ($node->hasAttribute("srcset") && preg_match("|/transparent\.png$|", $node->getAttribute("srcset"))) {
|
|
||||||
if ($node->hasAttribute("data-srcset")) {
|
|
||||||
$node->setAttribute("srcset", $node->getAttribute("data-srcset"));
|
|
||||||
$node->removeAttribute("data-srcset");
|
$node->removeAttribute("data-srcset");
|
||||||
} elseif ($node->hasAttribute("src")) {
|
|
||||||
$node->removeAttribute("srcset");
|
$node->removeAttribute("srcset");
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$tpl->setVariable('ARTICLE_ID', $article_link, true);
|
$tpl->setVariable('ARTICLE_ID', $article_link, true);
|
||||||
$tpl->setVariable('ARTICLE_LINK', $article_link, true);
|
$tpl->setVariable('ARTICLE_LINK', $article_link, true);
|
||||||
@ -146,6 +139,7 @@ class Af_Comics extends Plugin {
|
|||||||
$tpl->setVariable('ARTICLE_SOURCE_TITLE', $feed_title, true);
|
$tpl->setVariable('ARTICLE_SOURCE_TITLE', $feed_title, true);
|
||||||
|
|
||||||
$tpl->addBlock('entry');
|
$tpl->addBlock('entry');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user