您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Scrolls in YT Shorts automatically after a video finished
// ==UserScript== // @name YouTube Shorts Autoscroll and Seek // @version 1.2 // @description Scrolls in YT Shorts automatically after a video finished // @author Taki7o7 aka. WaGi-Coding // @match *://www.youtube.com/shorts/* // @require http://code.jquery.com/jquery-latest.js // @run-at document-idle // @license MIT // @namespace https://greasyfork.org/users/772124 // ==/UserScript== (function() { 'use strict'; var $ = window.jQuery; var vid = null; function GetVidAndBtn(){ if (document.querySelector("#shorts-player > div.html5-video-container > video") != null) { vid = document.querySelector("#shorts-player > div.html5-video-container > video"); $(vid).removeAttr('loop'); $(vid).on('ended',function(){ console.log("ended!"); $('#navigation-button-down').find("button").first().click(); }); } } var timer = setInterval(() => { addEventListener("keydown", function(e) { switch (e.key.toUpperCase()) { case "ARROWLEFT": case "A": vid.currentTime=vid.currentTime-2; break; case "ARROWRIGHT": case "D": vid.currentTime=vid.currentTime+2; break; default: console.log(e.key.toUpperCase()); break; } }); GetVidAndBtn(); //vid.currentTime = vid.currentTime - 1; clearInterval(timer); }, 500); var timer2 = setInterval(() => { GetVidAndBtn(); if ($('ytd-reel-video-renderer').length >= 28) { $('ytd-reel-video-renderer:lt(9)').remove(); } }, 500); })();