您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automates actions on Olevod video player
// ==UserScript== // @name Olevod Video Auto Next // @namespace http://your.domain.com // @version 1.1 // @description Automates actions on Olevod video player // @author Your Name // @match https://www.olevod.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; console.log("silent checking"); // Function to get the video element const getVideoElement = () => { return document.querySelector("video"); }; // Function to enter fullscreen mode const enterFullScreen = (video) => { if (video) { if (!document.fullscreenElement) { console.log("enter full screen") video.requestFullscreen(); } } }; // Function to check if the video time equals max time and click next episode const checkAndClickNextEpisode = () => { const video = getVideoElement(); if (video) { const currentTime = video.currentTime; const duration = video.duration; const maxTimeThreshold = 0.95; // Adjust this threshold as needed // If current time reaches 95% of the duration, simulate clicking the next episode button if (currentTime >= maxTimeThreshold * duration) { console.log("time is up, next"); const nextEpisodeButton = parent.$(".next-t");; if (nextEpisodeButton) { console.log("i got the next button"); nextEpisodeButton.click(); } } // Enter fullscreen mode only when the current time is close to the beginning of the duration if (currentTime < 5) { // Adjust the threshold as needed enterFullScreen(video); } } }; // Check and click next episode every second setInterval(checkAndClickNextEpisode, 1000); })();