YouTube Date Display Fix

Fix YouTube uploaded date bug on small screens. Can be used on large screens too.

As of 2020-03-09. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         YouTube Date Display Fix
// @name:pt-BR   Correção de exibição de data de envio do YouTube
// @namespace    André Augusto
// @version      1.0c.09.03.2020
// @icon         https://i.imgur.com/DjnjsJX.png
// @description  Fix YouTube uploaded date bug on small screens. Can be used on large screens too.
// @description:pt-BR  Correção da data de envio do vídeo não sendo exibida corretamente em telas pequenas.
// @author       André Augusto
// @match        *://www.youtube.com/*
// @run-at       document-start
// @grant        none
// @require http://code.jquery.com/jquery-3.4.1.min.js

// ==/UserScript==

// Method using jQuery and position after subscribers
//window.onload = function() {
//    $('#date').remove().insertAfter($("#owner-sub-count"));
//    $('#dot').remove();
//};

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle('.ytd-watch-flexy { --ytd-watch-flexy-max-player-width: auto; }');