Greasy Fork is available in English.

YouTube Shorts Spacebar Pause

Revert back the spacebar pause on YouTube Shorts

// ==UserScript==
// @name          YouTube Shorts Spacebar Pause
// @namespace     Violentmonkey Scripts
// @version       0.0.3
// @description   Revert back the spacebar pause on YouTube Shorts
// @match         *://www.youtube.com/shorts/*
// @exclude       *://www.youtube.com/embed/*
// @compatible    firefox
// @grant         none
// @author        Nekrux
// @license       GPL-3.0-or-later
// ==/UserScript==

var customEvent = new Event('keydown', {
  bubbles: true,
  cancelable: true,
  key: 'k',
  code: 'KeyK',
  which: 75,
});

// Aggiunge un listener all'evento keydown della barra spaziatrice
document.addEventListener('keydown', function(event) {
  if (event.code === 'Space') {
    event.preventDefault();
    document.dispatchEvent(customEvent);
  }
});