Lemmy Image Expand

Auto expands all image posts except NSFW ones.

< 脚本Lemmy Image Expand的反馈

评价:好评 - 脚本运行良好

§
发表于:2023-11-11
编辑于:2023-11-11

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();
        }

发表回复

登录以发表回复。