Greasy Fork is available in English.

Youtube player keyboard controls

Use play/pause/ArrowRight/ArrowLeft keyboard btns anywhere, but not only when youtube player is in focus. Additionaly use '[' and ']' keys to change playbackRate.

< Feedback on Youtube player keyboard controls

Review: OK - script works, but has bugs

§
Posted: 07-05-2019
Edited: 07-05-2019

[Feature request] Optionally take custom styles from localStorage

When I use your script I change the styles of the playback rate div.

Updating this script is problematic because I would lose my styles unless I make a quick backup before every update.

Maybe you can implement changes similar to this code below for this situation.

styleVar = /* take from localStorage if exists, else use default styles */

$moviePlayer.insertAdjacentHTML('afterbegin', `<div id="${playbackRateElId}" style="${styleVar}"></div>`);

For context here is what I change the styles to:

  • white text
  • transparent black background
  • move to left side of video player
  • smaller font size
$moviePlayer.insertAdjacentHTML('afterbegin', `<div id="${playbackRateElId}" style="position: absolute;
z-index: 9999999;
left: 10px;
bottom: 25%;
pointer-events: none;
display: block;
transition: opacity .7s;
opacity: 0;
color: #fff;
background-color: rgba(0, 0, 0, 0.8);
padding: 5px 10px;
border-radius: 2px;
width: auto;
height: 36px;
line-height: 36px;
font-size: 36px;
text-align: center;
text-shadow: 1px 1px 4px #000;"></div>`);
§
Posted: 17-05-2020

Hello. Thx for issue. I will consider this request.

Post reply

Sign in to post a reply.