您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
An attempt to implement loop for specified parts of YouTube videos. Doesn't work for background tabs.
当前为
// ==UserScript== // @name YouTube Best Parts Looper // @namespace https://gf.qytechs.cn/en/users/1413127-tumoxep // @version 1.0 // @description An attempt to implement loop for specified parts of YouTube videos. Doesn't work for background tabs. // @license WTFPL // @match https://www.youtube.com/watch* // @grant none // ==/UserScript== (function() { 'use strict'; const bestParts = [ // replace with yours { v: 's6sZzgV5k8w', start: 14210.05, end: 14231.5 }, { v: 'ZCzTYOaK_Ps', start: 29.9, end: 77.8 }, { v: '_gNkftpGybU', start: 71.2, end: 136.55 }, ]; function enableLoop(video, start, end) { function loopCheck() { if (video.currentTime >= end) { video.currentTime = start; video.play(); } requestAnimationFrame(loopCheck); } requestAnimationFrame(loopCheck); } function setupLoop() { const videoId = new URLSearchParams(window.location.search).get('v'); if (!bestParts.find(el => el.v === videoId)) { return; } const video = document.querySelector('video'); if (!video) { return; } bestParts.filter(p => p.v === videoId).forEach(p => enableLoop(video, p.start, p.end)); } setupLoop(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址