soup.io: Display hidden elements

Shows hidden reactions, reposts, icons and dates on soup.io pages

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name soup.io: Display hidden elements
// @namespace    http://xcvbnm.org/
// @author Nordern
// @description Shows hidden reactions, reposts, icons and dates on soup.io pages
// @version 4.1
// @match http://*.soup.io/*
// @match https://*.soup.io/*
// @license public domain
// ==/UserScript==
/* 
 * Available on github under: https://github.com/edave64/souplements/blob/master/showHiddenElements.js
 * Using the infinite scrolling support template: https://github.com/edave64/souplements/blob/master/infiniteScrollingTemplate.js
 */
 
(function () {
    function customCode () {
        [].forEach.call(
            document.querySelectorAll('.hide-reposted-by,.icons.hidden,.date.hidden,.hide-tags'),
            function (ele) {
                ele.classList.remove('hide-reposted-by');
                ele.classList.remove('hide-tags');
                ele.classList.remove('hidden');
            }
        );
    }

    // Reduces calls to customCode by limiting it to execute once per javascript activity and stops it from calling
    // itself.
    var _runner = null;
    function runDelayed () {
        if (_runner === null) {
            _runner = setTimeout(function () {
                try {
                    customCode();
                } finally {
                    _runner = null;
                }
            }, 0);
        }
    }
    function register () {
        customCode();
        new MutationObserver(runDelayed).observe(
            document.getElementById('contentcontainer'), {
                childList: true,
                subtree: true
            }
        );
    }
    // Is the soup page already loaded? This allows the custom code to run as both a bookmarklet and a userscript.
    if (document.getElementById('contentcontainer')) {
        register();
    } else {
        document.addEventListener("load", register);
    }
}());