YouTube Date Display Fix

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

Tính đến 09-03-2020. Xem phiên bản mới nhất.

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

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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çao de data de envio do YouTube
// @namespace    André Augusto
// @version      1.0 09.03.2020
// @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; }');