diff options
author | Andrew Dolgov <[email protected]> | 2018-08-31 08:33:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-08-31 08:33:36 +0300 |
commit | de1b9acba1b27f5e745f9029de49e476b5cb6603 (patch) | |
tree | ee4d668920b0b37ffde67d266416b4d2edf60e84 /plugins | |
parent | 2ab49fec9a01d263b2334b20135847552b7d84ed (diff) |
af_comics: simplify srcset attribute handling for gocomics pseudo-feeds
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/af_comics/init.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/af_comics/init.php b/plugins/af_comics/init.php index 626d0b15d..94305bc75 100755 --- a/plugins/af_comics/init.php +++ b/plugins/af_comics/init.php @@ -124,16 +124,9 @@ class Af_Comics extends Plugin { $node = $xpath->query('//picture[contains(@class, "item-comic-image")]/img')->item(0); if ($node) { - $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"); - } elseif ($node->hasAttribute("src")) { - $node->removeAttribute("srcset"); - } - } + $node->removeAttribute("width"); + $node->removeAttribute("data-srcset"); + $node->removeAttribute("srcset"); $tpl->setVariable('ARTICLE_ID', $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->addBlock('entry'); + } } } |