Greasy Fork is available in English.

reddit: always show spoilers

ของเมื่อวันที่ 27-08-2017 ดู เวอร์ชันล่าสุด

// ==UserScript==
// @name        reddit: always show spoilers
// @namespace   mailto:morten@with.de
// @include     *reddit.com*
// @version     1.0
// @run-at      document-start
// @grant       none
// @description:en always show spoilers
// ==/UserScript==

document.addEventListener("DOMContentLoaded", waitForSpoilers);

function doEverything(spoiler) {
    spoiler.click();
    waitForSpoilers();
}

function waitForSpoilers() {
    spoilers = document.getElementsByClassName("expando-gate--warning");

    if(spoilers.length > 0) {
        doEverything(spoilers[0]);
    } else {
        setTimeout(waitForSpoilers, 1000);
    }
}