Je suis un bon gros fan du style old. de reddit. Je préfère de la densité d’info à des hectares de pixels blancs, alors je me suis fait ce petit truc, en espérant que ça puisse être utile à d’autres. Stylus est une extension Firefox (je crois qu’elle est sous chrome aussi) qui permet de modifier le CSS de certaines pages. C’est pas encore parfait, je l’ai déjà édité deux fois pour corriger des petits défauts, mais ça peut faire la blague en attendant que les devs proposent d’autres styles:

.my-3 {
  margin: 0px;
  margin-bottom: 2px !important;
  margin-top: 2px !important;
}

.container-lg {
  max-width: 100%;
}

h5 {
    margin-bottom:0px;
    margin-top:2px;
    font-size: 1.0em;
}

.mb-1 {
    margin-bottom:0px !important;
}

.list-inline-item .text-info .mr-2 {
    max-height:16px;
    max-width:16px;
}

li.list-inline-item span a picture img.rounded-circle.img-icon.mr-2 {
    max-height:16px;
    max-width:16px;
}

.col-sm-2 {
  max-width: 48px;
}

.btn {
  font-size: 0.8rem;
  line-height: 1.0;
}

a.text-body div.thumbnail.rounded.bg-light.d-flex.justify-content-center {
    min-height: 34px;
}
  • keepthepaceOP
    link
    fedilink
    Français
    arrow-up
    1
    ·
    1 year ago

    Je connais pas tampermonkey mais d’après GPT-4, une conversion devrait donner ça:

    // ==UserScript==
    // @name         My Stylus Script
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  Inject custom styles into webpages
    // @author       You
    // @match        *://*/*
    // @grant        none
    // ==/UserScript==
    
    (function() {
        'use strict';
    
        let css = `
        .my-3 {
          margin: 0px;
          margin-bottom: 2px !important;
          margin-top: 2px !important;
        }
    
        .container-lg {
          max-width: 100%;
        }
    
        h5 {
    	margin-bottom:0px;
    	margin-top:2px;
    	font-size: 1.0em;
        }
    
        .mb-1 {
    	margin-bottom:0px !important;
        }
    
        .list-inline-item .text-info .mr-2 {
    	max-height:16px;
    	max-width:16px;
        }
    
        li.list-inline-item span a picture img.rounded-circle.img-icon.mr-2 {
    	max-height:16px;
    	max-width:16px;
        }
    
        .col-sm-2 {
          max-width: 48px;
        }
    
        .btn {
          font-size: 0.8rem;
          line-height: 1.0;
        }
    
        a.text-body div.thumbnail.rounded.bg-light.d-flex.justify-content-center {
    	min-height: 34px;
        }`;
    
        let style = document.createElement('style');
        style.type = 'text/css';
        style.appendChild(document.createTextNode(css));
        document.head.appendChild(style);
    })();
    

    Il précise que tu dois mettre l’URL du site que tu veux changer (la racine de ton instance) en face de @match