YouTube - Show Full View Count and Date (unless hovering)

Brings back the full view count and date to the description box.

Versione datata 27/07/2023. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

/* ==UserStyle==
@name           YouTube - Show Full View Count and Date (unless hovering)
@description    Brings back the full view count and date to the description box.
@namespace      lednerg
@version        23.7.26
@author         lednerg
@license        CC-BY-NC-SA-4.0
==/UserStyle== */

/* Instead of "1.7M views 2 years ago" it will say "1,739,201 views • Dec 12, 2019" in the description box.
   In case you need to see the default numbers, just hover the mouse over the description box.
   Normally there's a tooltip that appears when you hover over the view count, and it shows the full view count and date.
   This CSS script works by keeping that tooltip visible and repositioning it over the default numbers. */

@-moz-document domain("youtube.com") {

/* Places the tooltip over the "time ago" statement and mimics the font */
    #description .tp-yt-paper-tooltip {
        opacity: 1;
        transition: opacity .125s;
        display: block !important;
        position: relative;
        bottom: 101px;
        left: 2px;
        padding: 2px !important;
        padding-right: 50px !important; /* extra padding for large view counts */
        font-size: 14px !important;
        font-weight: 500 !important;
    }
/* Fade out tooltip whenever the mouse hovers over the description box (while it's collapsed) */
    ytd-watch-metadata[description-collapsed] #description:hover .tp-yt-paper-tooltip {
        opacity: 0 !important;
        transition: opacity .125s;
    }
/* Keeps tooltip's background from appearing during transitions */
    ytd-watch-metadata:not([description-collapsed]) #description .tp-yt-paper-tooltip {
        opacity: 0 !important;
        transition: opacity .125s;
    }
/* Adds the • symbol between the default view count and date in order to match the tooltip */
    #description #info span:first-child + span:before {
        content: " •";
        margin-right: -3.5px;
    }
/* Matching background color for dark mode */
    html[dark] #description .tp-yt-paper-tooltip {
        background-color: #272727 !important;
    }
      /* dark mode while hovering */
    html[dark] #description:hover .tp-yt-paper-tooltip {
        background-color: #3f3f3f !important;
    }
/* Matching background color for light mode */
    html:not([dark]) #description .tp-yt-paper-tooltip {
        color: #0f0f0f !important;
        background-color: #f2f2f2 !important;
    }
      /* light mode while hovering */
    html:not([dark]) #description:hover .tp-yt-paper-tooltip {
        color: #0f0f0f !important;
        background-color: #e5e5e5 !important;
    }

}