Greasy Fork is available in English.

Collapsit

Ermöglicht das Ein- und Ausklappen von Kommentaren auf Removeddit.

Version vom 31.05.2022. Aktuellste Version

// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT
/* eslint-env browser, greasemonkey */
/* jshint asi: true, esversion: 11 */

// ==UserScript==
// @name               Collapsit
// @name:de            Collapsit
// @name:en            Collapsit
// @namespace          TheLastZombie/userscripts
// @version            1.0.9
// @description        Enables collapsing (and expanding) of comments on Removeddit.
// @description:de     Ermöglicht das Ein- und Ausklappen von Kommentaren auf Removeddit.
// @description:en     Enables collapsing (and expanding) of comments on Removeddit.
// @compatible         chrome
// @compatible         edge
// @compatible         firefox
// @compatible         opera
// @compatible         safari
// @homepageURL        https://thelastzombie.github.io/userscripts/
// @supportURL         https://github.com/TheLastZombie/userscripts/issues/new?labels=Collapsit
// @contributionURL    https://ko-fi.com/rcrsch
// @contributionAmount €1.00
// @author             TheLastZombie <roesch.eric+userscripts@protonmail.com>
// @include            *://*.removeddit.com/r/*/comments/*
// @match              *://*.removeddit.com/r/*/comments/*
// @run-at             document-end
// @inject-into        auto
// @grant              none
// @noframes
// @icon               https://thelastzombie.github.io/userscripts/icons/Collapsit.ico
// @copyright          2020-2022, TheLastZombie (https://eric.jetzt/)
// @license            MIT; https://thelastzombie.github.io/userscripts/LICENSE
// ==/UserScript==

// ==OpenUserJS==
// @author             TheLastZombie
// ==/OpenUserJS==

(function () {
  "use strict";

  document.addEventListener("click", function (event) {
    if (
      event.target &&
      event.target.matches(".comment-head .author:not(.comment-author)")
    ) {
      event.preventDefault();
      if (event.target.textContent === "[–]") {
        Array.from(event.target.parentNode.parentNode.children)
          .slice(1)
          .forEach((x) => {
            x.style.display = "none";
          });
        event.target.textContent = "[+]";
      } else {
        Array.from(event.target.parentNode.parentNode.children)
          .slice(1)
          .forEach((x) => {
            x.style.display = "";
          });
        event.target.textContent = "[–]";
      }
    }
  });
})();

// @license-end