Greasy Fork is available in English.

Discord: View hidden channels

View hidden channels in any discord server.

// ==UserScript==
// @name         Discord: View hidden channels
// @description  View hidden channels in any discord server.
// @version      1.0
// @author       Midnight
// @namespace    https://google.com
// @match        *://*/*
// @run-at       document-start
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    "use strict";

    const log = console.log;

    // Get all channels
    const channels = document.querySelectorAll(".channel");

    // Loop through channels
    for (const channel of channels) {
        // Check if channel is hidden
        if (channel.classList.contains("hidden")) {
            // Show channel
            channel.style.display = "block";

            // Disable clicking on channel
            channel.addEventListener("click", () => {
                return false;
            });
        }
    }
})();