您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically plays TikTok videos and scrolls to the next one after it finishes.
// ==UserScript== // @name TikTok AutoPlay & Next Video // @namespace https://www.tiktok.com/ // @version 0.6 // @description Automatically plays TikTok videos and scrolls to the next one after it finishes. // @author MumuAlpaka // @match *://www.tiktok.com/* // @grant none // @run-at document-idle // @license MIT // ==/UserScript== (function () { 'use strict'; function autoplayNextVideo() { const video = document.querySelector('video'); if (!video) return; video.onended = () => { console.log('Video ended. Moving to next...'); const nextButton = document.querySelector('[data-e2e="arrow-right"]'); if (nextButton) { nextButton.click(); // Click next video button } else { window.scrollBy(0, window.innerHeight); // Scroll down (alternative method) } }; } function waitForVideo() { const observer = new MutationObserver(() => { autoplayNextVideo(); }); observer.observe(document.body, { childList: true, subtree: true }); } waitForVideo(); })();