Element Compact room list

Shrinks room list items in Element to fit more on the screen

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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         Element Compact room list
// @namespace    http://artificialworlds.net/
// @version      0.1
// @description  Shrinks room list items in Element to fit more on the screen
// @author       Andy Balaam
// @match        https://app.element.io
// @grant        none
// @license      AGPL-3.0-or-later
// ==/UserScript==

(function() {
    'use strict';

    function addStyle(css) {
        const style = document.getElementById("GM_addStyleContainer") || (function() {
            const style = document.createElement('style');
            style.type = 'text/css';
            style.id = "GM_addStyleContainer";
            document.head.appendChild(style);
            return style;
        })();
        const sheet = style.sheet;
        sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length);
    }

    addStyle(`
        .mx_BaseAvatar_image {
            width: 16px !important;
            height: 16px !important;
        }
    `);

    addStyle(`
        .mx_RoomTile {
            padding: 2px;
            margin-bottom: 0px;
            height: 20px
        }
    `);

    addStyle(`
        .mx_RoomBreadcrumbs .mx_RoomBreadcrumbs_crumb {
            margin-right: 2px;
        }
    `);
})();