PW Live Speed Controller

Sets video speed to 3x on PW Live

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

Advertisement:

// ==UserScript==
// @name        PW Live Speed Controller
// @namespace   pw-live-speed
// @description Sets video speed to 3x on PW Live
// @include     https://www.pw.live/watch/*
// @version     1
// @grant       none
// ==/UserScript==

(function() {
    'use strict';
    
    // Simple function to set video speed
    function setSpeed() {
        let videos = document.getElementsByTagName('video');
        for (let video of videos) {
            video.defaultPlaybackRate = 3.0;
            video.playbackRate = 3.0;
            
            // Lock the playback rate
            Object.defineProperty(video, 'playbackRate', {
                get: () => 3.0,
                set: function() { return; }
            });
        }
    }

    // Run initially
    setSpeed();
    
    // Simple periodic check for dynamically loaded videos
    setInterval(setSpeed, 1000);
})();