Reddit Comment Expander

Expands reddit comments by default to mitigate the Crowd Control feature

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Reddit Comment Expander
// @version      1.1
// @description  Expands reddit comments by default to mitigate the Crowd Control feature
// @author       /u/Tural-
// @match        https://*.reddit.com/*
// @grant        none
// @namespace https://greasyfork.org/users/280996
// ==/UserScript==
 
(function() {
    'use strict';
 
    // Get all the comments that are not 'collapsed for a reason'
    // "collapsed-for-reason" class is used by reddit to define comments that were collapsed because they are below the viewer's score threshold and we don't want to supersede that functionality
    // We only want to expand comments that were collapsed by moderators as part of the feature explained here: https://old.reddit.com/r/redditsecurity/comments/b0a8he/detecting_and_mitigating_content_manipulation_on/
    let comments = document.querySelectorAll(".thing.collapsed:not(.collapsed-for-reason)");
 
    // Loop through the comment array
    comments.forEach(function (el, i) {
        el.classList.remove("collapsed");
        el.classList.add("noncollapsed");
    });
 
})();