mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 17:45:40 +03:00
[GolemBridge] Remove image galleries (#2761)
Do not add all images of the image gallery, but only the preselected one. Often, the same gallery is used multiple times with different preselected images. The previous implementation always added all images of the gallery, cluttering the article. This patch only adds the preselected one. The no-js link wrapping around the gallery leads to a 403 Forbidden page, so linking that doesn't work to really support galleries.
This commit is contained in:
parent
8172d10bb5
commit
8865521b3b
1 changed files with 3 additions and 3 deletions
|
@ -111,12 +111,12 @@ class GolemBridge extends FeedExpander {
|
|||
|
||||
$content = $article->find('div.formatted', 0);
|
||||
|
||||
// fix image galleries (empty src attribute), additionally full image quality
|
||||
foreach($content->find('img[data-src-full]') as $img) {
|
||||
// full image quality
|
||||
foreach($content->find('img[data-src-full][src*="."]') as $img) {
|
||||
$img->src = $img->getAttribute('data-src-full');
|
||||
}
|
||||
|
||||
foreach($content->find('p, h1, h3, img') as $element) {
|
||||
foreach($content->find('p, h1, h3, img[src*="."]') as $element) {
|
||||
$item .= $element;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue