Greasy Fork

Greasy Fork is available in English.

7ktTube CSS corrections

Corrections to UI of youtube.com after 7ktTube | 2016 REDUX script

当前为 2022-05-21 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name          7ktTube CSS corrections
// @description   Corrections to UI of youtube.com after 7ktTube | 2016 REDUX script
// @author        MK
// @namespace     max44
// @homepage      http://greasyfork.icu/en/users/309172-max44
// @match         *://*.youtube.com/*
// @match         *://*.youtu.be/*
// @icon          https://cdn.icon-icons.com/icons2/1488/PNG/512/5295-youtube-i_102568.png
// @version       1.1.6
// @license       MIT
// ==/UserScript==

(function() {
  var css = `
  /*Overlay over thumbnail*/
  ytd-thumbnail-overlay-resume-playback-renderer:not(.foo) {
    display: block !important;
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0) !important;
    transition: all 0s ease 0s !important;
    z-index: 9 !important;
  }
  /*Progress bar over thumbnail*/
  #progress.ytd-thumbnail-overlay-resume-playback-renderer:not(.foo) {
    display: block !important;
    background-color: red !important;
    opacity: 1 !important;
  }
  /*Video duration background over thumbnail*/
  ytd-thumbnail-overlay-resume-playback-renderer:hover:not(.foo) {
    height: inherit !important;
    opacity: 1 !important;
  }
  /*Video duration over thumbnail*/
  ytd-app ytd-thumbnail-overlay-time-status-renderer:not(.foo) {
    font-size: 12px !important;
    height: 12px !important;
    line-height: 12px !important;
    opacity: 1 !important;
    padding: 3px 4px !important;
  }
  /*Video duration over thumbnail*/
  #scroll-container.yt-horizontal-list-renderer ytd-thumbnail-overlay-time-status-renderer:not(.foo) {
    top: auto !important;
  }
  /*Youtube apps button*/
  /*ytd-topbar-menu-button-renderer:nth-last-of-type(2) yt-icon:not(.foo) {
    fill: inherit !important;
  }*/
  /*Channel name under description*/
  ytd-app #channel-name.ytd-video-owner-renderer:not(.foo) {
    top: auto !important;
  }
  /*Remove "Add to" string from "Save" button*/
  #text.ytd-button-renderer::after {
    content: "" !important;
  }
  /*Remove duplicated icon from "Save" button*/
  button#button.style-scope[aria-label="Save to playlist"] yt-icon.style-scope {
    background: none !important;
  }
  /*Remove duplicated icon from "Clip" button*/
  button#button.style-scope[aria-label="Clip"] yt-icon.style-scope {
    background: none !important;
  }
  /*Make bigger gap between computed buttons*/
  div#top-level-buttons-computed ytd-button-renderer.force-icon-button {
    margin-left: 10px !important;
  }
  /*Do not reorder computed buttons upon activation*/
  ytd-toggle-button-renderer.style-default-active[is-icon-button]:not(.foo) {
    order: unset !important;
  }
  /*Remove duplicated dropdown menu*/
  div#top-level-buttons-computed yt-icon-button#button.dropdown-trigger {
    display: none !important;
  }
  /*Align dropdown menu*/
  ytd-menu-renderer yt-icon-button#button.dropdown-trigger button#button.style-scope[aria-label="More actions"] {
    padding-top: 5px !important;
  }
  `;

  if (typeof GM_addStyle != 'undefined') {
    GM_addStyle(css);
  } else if (typeof PRO_addStyle != 'undefined') {
    PRO_addStyle(css);
  } else if (typeof addStyle != 'undefined') {
    addStyle(css);
  } else {
    var node = document.createElement('style');
    node.type = 'text/css';
    node.appendChild(document.createTextNode(css));
    document.documentElement.appendChild(node);
  }
})();