Skip to content

Clean YouTube by 0ko

Imported from a private source

Mirrored from https://codeberg.org/0ko/UserStyles/raw/main/YouTube/Clean/CleanYouTube.user.css

Screenshot of Clean YouTube

Details

Author0ko

LicenseMIT

Categoryyoutube

Created

Updated

Size8.6 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Simplificator and debloater for YouTube aimed at minimizing breaking.

Notes

Removes unnecessary things such as:

  • shorts
  • playables (mini-games)
  • latest posts, surveys on homepage
  • unrelated videos in search results
  • video suggestions after playback ends
  • watch next column
  • sidebar junk
  • ...

Take a look at the Source code or click Install to see what else it's able to remove.

Check out this userstyle which removes some avatars to make the UI less noisy. This is too major change to be included in this userstyle.


Changelog · License · Feedback

Source code

/* ==UserStyle==
@name          Clean YouTube
@author        0ko (https://userstyles.world/~0ko)
@description   Simplificator and debloater for YouTube aimed at minimizing breaking. Formerly known as Enhancements for YouTube.
@version       3.3.0
@license       MIT
@preprocessor  stylus

@namespace     0ko userstyles
@homepageURL   https://codeberg.org/0ko/UserStyles#clean-youtube
@supportURL    https://codeberg.org/0ko/UserStyles/issues

@var checkbox  noShorts               "No short videos"               1
@var checkbox  noVoiceSearch          "No voice search"               1
@var checkbox  noUpload               "No upload button"              0
@var checkbox  lessCrazyAnimations    "Less crazy button animations"  1
@var checkbox  noMemberships          "No channel memberships"        1

@var select    noHome_                "Home:"                 {" ":"_"}
@var checkbox  noHomeTags             "  No top tags"                 0
@var checkbox  noHomeDifferent        "  No New to you"               1
@var checkbox  noHomeLatestPosts      "  No Latest posts"             0
@var checkbox  noHomeVideoSurveys     "  No video Surveys"            1
@var checkbox  noHomeJunkSections     "  No other junk sections"      1

@var select    noVideo_               "Video:"                {" ":"_"}
@var checkbox  noVideoCornerLogo      "  No logo in corner"           1
@var checkbox  noVideoPlayNext        "  No Next video button"        1
@var checkbox  noVideoClipButton      "  No Clip button"              1
@var checkbox  noVideoWatchNext       "  No Watch next column (emptiness) OR new bottom grid" 0
@var checkbox  noVideoEndscreenVideos "  No endscreen video suggestions" 0
@var checkbox  noVideoSuggestionsTags "  No tags for Watch next"      1
@var checkbox  noVideoVignette        "  No bottom vignette"          0
@var checkbox  noVideoVignetteTop     "  No top vignette (fullscreen)" 0
@var checkbox  noVideoChannelLinks    "  No channel links (socials) in description" 1

@var select    noLogo_                "Logo:"                 {" ":"_"}
@var checkbox  noLogoAccent           "  Monochrome button"           0
@var checkbox  noLogoCountryCode      "  No country code"             1

@var select    noSidebar_             "Sidebar:"              {" ":"_"}
@var checkbox  noSidebarNewnessDots   "  No newness dots"             1
@var checkbox  noSidebarBloat         "  No bloat"                    1

@var checkbox  noSubsTopGap           "Subscriptions: reduce top gap" 1

@var checkbox  noSearchUnrelated      "Search: no unrelated videos"   1

@var checkbox  noCommentsPaidBg       "Comments: no paid background"  1

==/UserStyle== */

imp = !important

@-moz-document domain("youtube.com")

	if noShorts
		/* on Main and in Subscriptions (alt: &:has(a[href^="/feed/subscriptions/shorts"])) */
		ytd-rich-shelf-renderer[is-shorts]
			display: none imp

		/* in Search */
		ytd-reel-shelf-renderer /* section */
			&:has(ytm-shorts-lockup-view-model-v2)
				display: none imp
		ytd-video-renderer /* video */
			&:has(a#video-title[href^="/shorts/"])
				display: none imp

		/* "Shorts remixing this video" */
		#description ytd-reel-shelf-renderer.ytd-structured-description-content-renderer:has(#dismissible)
			display: none imp

	if noVoiceSearch
		#voice-search-button.ytd-masthead
			display: none imp

	if noUpload
		ytd-topbar-menu-button-renderer.ytd-masthead:nth-child(1):has(path[d*="3v3H9v"])
			display: none imp

	if lessCrazyAnimations
		ytd-segmented-like-dislike-button-renderer
		segmented-like-dislike-button-view-model
			.smartimation__border-gradient
				display: none
			.smartimation--active-border .smartimation__background
				opacity: 0
			ytd-lottie-player
				filter: saturate(0)

		#subscribe-button
			.animated-action__background-container
			.animated-action__lottie
			.smartimation__border
				display: none
			ytd-subscribe-button-renderer[animated-action-enabled][subscribed]
				transition: width .1s ease

		/* Remove seekbar gradient */
		.ytp-play-progress
			background: rgb(255, 0, 51) imp

	if noMemberships
		ytd-item-section-renderer
			ytd-recognition-shelf-renderer
				display: none

	/* Homepage */

	if noHomeTags
		ytd-feed-filter-chip-bar-renderer
			display: none imp
		ytd-rich-grid-renderer #contents.ytd-rich-grid-renderer
			padding-top: 16px imp


	if noHomeDifferent
		.ytd-feed-nudge-renderer /* "Looking for something different?" */
		yt-chip-cloud-chip-renderer[chip-style="STYLE_REFRESH_TO_NOVEL_CHIP"]
			display: none imp

	if noHomeLatestPosts
		#dismissible
		.ytd-rich-shelf-renderer
		.ytd-rich-section-renderer
			&:has(ytd-post-renderer)
				display: none imp

	if noHomeVideoSurveys
		#dismissible .ytd-inline-survey-renderer
		ytd-popup-container ytd-checkbox-survey-renderer
			display: none imp

	if noHomeJunkSections
		.ytd-rich-shelf-renderer:has(a[href="/playables"])
		.ytd-rich-shelf-renderer:has(a[href="/feed/storefront"]) /* "Primetime movies for you" */
			display: none imp


	/* Video */

	if noVideoCornerLogo
		.iv-branding
		/*branding-img-container ytp-button*/
		/*branding-img iv-click-target     */
		/*branding-context-container-outer */
			display: none imp

	if noVideoPlayNext
		#ytd-player .ytp-next-button
			display: none imp

	if noVideoClipButton
		yt-button-view-model:has(path[d*="1-1 1 .45 1 1zm-1 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3.79-7.77L21"])
			display: none imp

	if noVideoWatchNext
		ytd-watch-next-secondary-results-renderer
		ytd-watch-grid.ytd-page-manager #bottom-grid
			display: none imp

	if noVideoEndscreenVideos
		.ytp-endscreen-content
			display: none imp

	if noVideoSuggestionsTags
		ytd-watch-next-secondary-results-renderer
			yt-related-chip-cloud-renderer.&
				display: none imp
			ytd-watch-flexy[default-layout] & ytd-compact-video-renderer:first-child
				margin-top: 0 imp

	if noVideoVignette
		.ytp-gradient-bottom
			display: none imp

	if noVideoVignetteTop
		.ytp-gradient-top
			display: none imp

	if noVideoChannelLinks
		ytd-video-description-infocards-section-renderer yt-button-view-model
			/* Patreon, Instagram, Twitter, Discord, Reddit */
			&:has(a[href^="https://"])
				display: none imp


	/* Logo */

	if noLogoAccent
		#logo svg g:first-child:not(g g)
				filter: grayscale(100%) contrast(1.25)
		[dark] #logo svg g:first-child:not(g g)
				filter: grayscale(100%) invert(100%) brightness(1.33)

	if noLogoCountryCode
		/* Kind of pointless country code, since the content you see and watch doesn't necessarily depend on it. Imagine every website you visit having a country code in it's logo. */
		#logo
		ytd-topbar-logo-renderer
			#country-code
				display: none


	/* Sidebar */

	if noSidebarNewnessDots
		#newness-dot
			display: none imp

	if noSidebarBloat
		.tp-yt-app-drawer
			/* 1st block */
			a#endpoint[title="Shorts"]
			/* 2nd block */
			a[href^="/feed/clips"][title]
			/* Explore */
			a[href^="/feed/trending"][title]
			a[href^="/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ"][title]
			a[href^="/feed/storefront"][title]
			a[href^="/channel/UC4R8DWoMoI7CAwX8_LjQHig"][title]
			a[href^="/gaming"][title]
			a[href^="/channel/UCEgdi0XIXXZ-qJOFPf4JSKw"][title]
			/* More from YouTube */
			a[href^="https://studio.youtube.com"][title="Creator Studio"]
			a[href^="https://studio.youtube.com"][title="YouTube Studio"]
			a[href^="https://music.youtube.com"][title="YouTube Music"]
			a[href^="https://www.youtubekids.com"][title="YouTube Kids"]
			a[href^="https://tv.youtube.com"][title="YouTube TV"]
			/* Last block */
			a#endpoint[title="Send feedback"]
			/* Footer */
			#guide-links-secondary.ytd-guide-renderer > a[href="/new"] /* "Test new features" - premium only */
			#footer.ytd-guide-renderer #copyright
				display: none imp

			#sections
				ytd-guide-section-renderer:nth-last-child(2)
				ytd-guide-section-renderer:nth-last-child(3)
					display: none


		/* Subscriptions */

		if noSubsTopGap
			ytd-browse[page-subtype="subscriptions"] .grid-subheader.ytd-shelf-renderer
				margin-top: 0 imp


		/* Search */

		if noSearchUnrelated
			.ytd-search ytd-shelf-renderer
				display: none imp


		/* Comments */

		if noCommentsPaidBg
			#paid-comment-background
				display: none imp

Reviews

No reviews yet.