Lemmy Image Expand

Auto expands all image posts except NSFW ones.

< Feedback on Lemmy Image Expand

Review: Good - script works

§
Posted: 11 November 2023
Edited: 11 November 2023

Works exactly as intended.

If you want it to open NSFW posts as well, change this code:

      uniqueList.forEach(function(imgPreview) {
        const postListing = imgPreview.closest(".post-listing");
        const isExpanded = postListing.querySelector('.img-expanded') != null;
        const isNsfw = postListing.querySelector('.thumbnail.img-blur') != null;
        if(!isExpanded && !isNsfw) {
          imgPreview.click();
        }

To this:

      uniqueList.forEach(function(imgPreview) {
        const postListing = imgPreview.closest(".post-listing");
        const isExpanded = postListing.querySelector('.img-expanded') != null;
        if(!isExpanded) {
          imgPreview.click();
        }

Post reply

Sign in to post a reply.