Skip to content

YouTube - Hide buttons when the video is paused by SaSh0o0k

Details

AuthorSaSh0o0k

LicenseNone

Categoryuserstyles

Created

Updated

Size1.7 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Hide buttons when the video is paused and reveal them again on hover

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name           YouTube - Hide buttons when the video is paused
@namespace      userstyles.world/user/SaSh0o0k
@version        2.0.0
@description    Hide buttons when the video is paused and reveal them again on hover
@author         SaSh0o0k

@preprocessor   stylus
@var            checkbox oHide    "Show buttons on hover when paused" 1
@var            number   oPaused  "Buttons opacity when paused"       [1, 0, 1, 0.01]
@var            number   oPlaying "Buttons opacity when playing"      [1, 0, 1, 0.01]
==/UserStyle== */

@-moz-document domain("youtube.com") {
if oHide {

div:not(:hover).ytp-chrome-bottom div:not(.html5-main-video),
div:not(:hover).ytp-chrome-top div:not(.html5-main-video) {
  opacity: 0;
}

/* .paused-mode .ytp-gradient-top,
.paused-mode .ytp-gradient-bottom {
    display: none;
} */

.ytp-gradient-top {
    height: 0px !important;
    opacity: 0.5 !important;
}
 
.ytp-gradient-bottom {
    height: 0px !important;
    opacity: 0.7 !important;
}

.paused-mode .ytp-gradient-top,
.paused-mode .ytp-gradient-bottom {
    display: none;
}
    
/* хз */
/* div:not(:hover).html5-main-video :not(.ytp-ce-shadow) {
  opacity: 0;
} */

/* .paused-mode(.unstarted-mode) .ytp-gradient-top,
.paused-mode(.unstarted-mode) .ytp-gradient-bottom {
    display: none !important;
} */


/* ориг */
/* 	.paused-mode:not(.unstarted-mode) > div:not(.html5-video-container):not(.ytp-ce-shadow) {
		opacity: 0
	} */
}
.paused-mode:hover > div:not(.html5-video-container):not(.ytp-ce-shadow) {
	opacity: oPaused
}
.playing-mode:not(.ytp-autohide):hover > div:not(.html5-video-container):not(.ytp-ce-shadow):not(.ytp-caption-window-container) {
	opacity: oPlaying
}
}

Reviews

No reviews yet.