YouTube Studio Scheduled Date Visual Enhancer

Sort YouTube Studio videos by scheduled and published date easier through visual cues (border and bgcolor)

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 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 Studio Scheduled Date Visual Enhancer
// @description Sort YouTube Studio videos by scheduled and published date easier through visual cues (border and bgcolor)
// @version  2
// @grant    none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @match https://studio.youtube.com/channel/*/videos/upload*
// @namespace ปวัตน
// ==/UserScript==
console.log("YouTube Studio Scheduled Date Visual Enhancer running");
window.addEventListener('load', function() {

this.$ = this.jQuery = jQuery.noConflict(true);
var timerVar    = setInterval (function() {DoMeEverySecond (); }, 5000);

function isOdd(num) { return num % 2;}
  
function DoMeEverySecond ()
{
  dayPrev=0;
  $("ytcp-content-section#video-list div.video-table-content ytcp-video-row").each(function() {
  	cell = $(this).find("div#row-container div.tablecell-date")
  	description = $(cell).find("div.cell-description").text().trim();
    visibility = $(this).find("#row-container div.tablecell-visibility span.label-span").text().trim();
    console.log(visibility);
    if (description == "Scheduled" || description == "Published") {
      day = $(cell).text().trim().split(",")[0].split(" ")[1];
      // border
      if (day != dayPrev) {
        $(this).find("#row-container").css("border-top", "solid black 3px");
      } else {
        $(this).find("#row-container").css("border-top", "solid black 0px");
      }
      dayPrev = day;
      // bg
      if (isOdd(day)) {
        if (visibility == "Public") {
          $(this).find("#row-container").css("background-color", "#ada");
        } else {
          $(this).find("#row-container").css("background-color", "#ddd");
        }
      } else {
        if (visibility == "Public") {
          $(this).find("#row-container").css("background-color", "#dfd");
        } else {
        	$(this).find("#row-container").css("background-color", "transparent");
        }
      }
    }
  });
}

//--- When ready to stop the timer, run this code:
//clearInterval (timerVar);
//timerVar        = "";
  
}, false);