Hide Youtube Images on collapsed records

by Kai, Friday, February 19, 2021, 13:38 (1162 days ago)

Hi all,
I've added my first youtube channel to my selfoss installation and I'm quite surprised that the large youtube image (480x360) is always shown, regardless whether section is collapsed or not. There seems to be no parameter to change this, right? Currently my feed then just shows 2 articles :-( due to these large images. Is it somehow possible to place these images into the expanded section part so they are not shown until I click on the title?
Many thanks!

Hide Youtube Images on collapsed records

by jtojnar, Saturday, February 20, 2021, 12:12 (1161 days ago) @ Kai

There are two options to achieve that:

You can disable thumbnails altogether by adding show_thumbnails=0 to your config.ini file. But that also applies for thumbnails of other source types and you would lose the thumbnails completely. The patch also is not available in 2.18 so you would need the development build.

Alternately, you can hide the thumbnail by adding the following CSS into user.css file in the root of your selfoss installation:

.entry:not(.expanded) .entry-thumbnail {
display: none;
}

I only tested that with development release, though. It might need to be adjusted if you use selfoss 2.18.

Hide Youtube Images on collapsed records

by Kai, Saturday, February 20, 2021, 12:35 (1161 days ago) @ jtojnar

Thanks jtojnar, that's great! I tried your user.css modification and the youtube images are gone :-) Unfortunately they never display now, even with expanded section. I tried with ".selected" rather than ".expanded" as this will not show the images initially and then display it when selected, but unfortunately it does not hide the youtube image when collapsing the section because it's still selected. Anyway, I'm now using your proposed css so that the youtube images are never shown.
Thanks a lot!

Hide Youtube Images on collapsed records

by jtojnar, Saturday, February 20, 2021, 13:02 (1161 days ago) @ Kai

I looked at the source code for selfoss 2.18 and it looks like there unfortunately is not any equivalent to the expanded class. It would be possible to do it in user.js but that is probably more trouble than it is worth so I would just switch to the latest build.

I have now pushed a fix so that show_thumbnails=0 will only affect collapsed articles.

RSS Feed of thread
powered by my little forum