Skip to content

Instantly share code, notes, and snippets.

@paponius
paponius / Video speed control - README.md
Last active January 20, 2026 17:42
Userscript to manage video speed using simple keyboard shortcuts. Video speed is displayed in the page title automatically

Keyboard shortcuts for HTLM5 video speed and FW/RW skips (UserScript)

A mod from: https://gist.github.com/Anmol-Sharma/bdfb563f8a65ee0c84958cb3fee74187/

This is a lightweight script, for maximum compatibility. Only to have speed control and 5/10 sec. FF/RW skips. (I have another version, see on bottom)
It's only active during the video playback, to minimize issues with a page.
The video element does not need to be in focus - does not need to be clicked.
Keys defeined in this script will override existing shortcut keys.
For example on Tiktok, by default arrows do skip back/forward but only with video in focus. With this they will work also without focus.

// SNIPPET whenPageReady v1.3
// state: [interactive | complete]
// usage: whenPageReady(doStuff, 'interactive');
var whenPageReady = (handler, state = 'complete') => {
var eventName;
if (state === 'DOMContentLoaded') { state = 'interactive'; }
if (state === 'load') { state = 'complete'; }
if (state !== 'interactive' && state !== 'complete') {
console.warn('SCRIPTNAME: whenPageReady(): wrong STATE argument: ' + state + '. Defaulting to: "complete".');
@paponius
paponius / file1mod1
Last active March 5, 2025 11:49
testgist
// this is file 1
// edit
// edit after edit filename
// 2503
// na PC
// skus ces github desktop tlacit
// vyp v options