Remove YouTube Shorts from sidebar

A user script to enchance Hacker News page styles

目前為 2023-02-05 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Remove YouTube Shorts from sidebar
// @namespace    https://gf.qytechs.cn/en/users/1019658-aayush-dutt
// @version      1
// @description  A user script to enchance Hacker News page styles
// @author       aayushdutt
// @match        https://*.youtube.com/*
// @grant        none
// @link         none
// @license      MIT
// ==/UserScript==

(function() {
  'use strict';

  const styles = `<style>
    /* Sidebar expanded */
    #items > ytd-mini-guide-entry-renderer:nth-child(2) {
      display: none;
    }

    /* Sidebar collapsed */
    #items > ytd-guide-entry-renderer:nth-child(2) {
      display: none;
    }

    /* Mobile pivot bar */
    #app > ytm-pivot-bar-renderer > ytm-pivot-bar-item-renderer:nth-child(2) {
      display: none;
    }
  </style>`

  document.head.insertAdjacentHTML("beforeend", styles)

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址