Vidplay / MyCloud Auto Playback Rate 1.5x

Automatically set playback rate to 1.5x on Vidplay and MyCloud videos

当前为 2024-06-09 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Vidplay / MyCloud Auto Playback Rate 1.5x
// @namespace    https://github.com
// @version      0.1
// @description  Automatically set playback rate to 1.5x on Vidplay and MyCloud videos
// @author       TellerTellerMoose
// @match        https://mcloud.bz/*
// @match        https://vid142.site/*
// @match        https://megacloud.tv/*
// @icon         https://static.vecteezy.com/system/resources/previews/003/833/977/non_2x/fast-delivery-icon-with-timer-fast-stopwatch-line-icon-fast-delivery-shipping-service-sign-speed-clock-symbol-urgency-deadline-time-management-competition-sign-stock-vector.jpg
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Function to set playback rate
    function setPlaybackRate(rate) {
        let video = document.querySelector('video');
        if (video) {
            video.playbackRate = rate;
            console.log(`Playback rate set to ${rate}`);
        } else {
            console.log("Video element not found.");
        }
    }

    // Wait for the video element to load and then set the playback rate
    function waitForVideo() {
        let video = document.querySelector('video');
        if (video) {
            setPlaybackRate(1.5); // Set your desired playback rate here
        } else {
            setTimeout(waitForVideo, 1000); // Check again in 1 second
        }
    }

    // Initiate the wait for video function
    waitForVideo();
})();