this post was submitted on 06 Jul 2023
2 points (100.0% liked)

Ask Burggit!

2 readers
2 users here now

Ask Burggit!

Ever had a question you wanted to ask? Get an opinion on something?

Well, here's the place to do it! Ask the community pretty much anything.

Rules:

founded 1 year ago
MODERATORS
 

Title. For example, the following settings on lemmynsfw.com:

you are viewing a single comment's thread
view the rest of the comments
[–] MikaGoesDown@burggit.moe 1 points 1 year ago (1 children)
[–] Nazrin@burggit.moe 2 points 1 year ago* (last edited 1 year ago) (1 children)

From a different thread, this one supposedly auto expands images:

// ==UserScript==
// @name    Expand Images
// @match   https://burggit.moe/*
// ==/UserScript==

// Permission to use, copy, modify, and/or distribute this software for
// any purpose with or without fee is hereby granted.

// Start the script
poll();

function poll() {
  expand();
  setTimeout(poll, 200);
}

function expand() {
  const posts = document.querySelectorAll("div.post-listing");
  for (const post of posts) {
    const imgThumbnail = post.querySelector("button.thumbnail");
    const isImage = imgThumbnail !== null;
    const isExpanded = post.childElementCount > 2;
    if (isImage && !isExpanded) {
      imgThumbnail.click();
    };
  }
}