YouTube Studio Scheduled Date Visual Enhancer

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

当前为 2021-05-22 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name YouTube Studio Scheduled Date Visual Enhancer
  3. // @description Sort YouTube Studio videos by scheduled and published date easier through visual cues (border and bgcolor)
  4. // @version 1
  5. // @grant none
  6. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
  7. // @match https://studio.youtube.com/channel/*/videos/upload*
  8. // @namespace ปวัตน
  9. // ==/UserScript==
  10. console.log("YouTube Studio Scheduled Date Visual Enhancer running");
  11. window.addEventListener('load', function() {
  12.  
  13. this.$ = this.jQuery = jQuery.noConflict(true);
  14. var timerVar = setInterval (function() {DoMeEverySecond (); }, 5000);
  15.  
  16. function isOdd(num) { return num % 2;}
  17. function DoMeEverySecond ()
  18. {
  19. dayPrev=0;
  20. $("#video-list .video-table-content ytcp-video-row").each(function() {
  21. cell = $(this).find("#row-container .tablecell-date")
  22. description = $(cell).find("div.cell-description").text().trim();
  23. if (description == "Scheduled" || description == "Published") {
  24. day = $(cell).text().trim().split(",")[0].split(" ")[1];
  25. // border
  26. if (day != dayPrev) {
  27. $(this).find("#row-container").css("border-top", "solid black 3px");
  28. } else {
  29. $(this).find("#row-container").css("border-top", "solid black 0px");
  30. }
  31. dayPrev = day;
  32. // bg
  33. if (isOdd(day)) {
  34. $(this).find("#row-container").css("background-color", "#ddd");
  35. } else {
  36. $(this).find("#row-container").css("background-color", "transparent");
  37. }
  38. }
  39. });
  40. }
  41.  
  42. //--- When ready to stop the timer, run this code:
  43. //clearInterval (timerVar);
  44. //timerVar = "";
  45. }, false);